[eluser]Unknown[/eluser]
Hello.
Been planning to code an ACL-supported controller and is honestly quite perplexed.
I have two controllers for testing purposes when I tried extending the default CI controller.
First one:
/application/libraries/MY_Controller.php
Code:
<?php
class MY_Controller extends Controller {
function MY_Controller() {
parent::Controller();
}
}
Second one:
/application/libraries/MY_Testcontroller.php
Code:
<?php
class MY_Testcontroller extends Controller {
function MY_Testcontroller() {
parent::Controller();
}
}
First one works, second one doesn't. Now, can anyone explain why in gods name I can't name my
CUSTOM controllers any name I want (accepting the fact that I have to have the prefix MY_ in the front)?
There are naming conventions for the file, the class itself when it comes to capitalization, but why the same name as the original class I am trying to extend?
If this is a gotcha, I am a bit tempted to jump ship in fear of what other gotchas I am to expect.
//Frank