In KO2, I had a file called libraries/CUSTOM_Controller.php, in which I kept common methods that I wanted to be available to all controllers.
Is there a similar way to do this in KO3? I don’t see anything in the docs (such as they are) about overriding the controller.
Thanks!
Here comes the philosophy of Kohana 3. If you look in this
SYSPATH/classes/controller.phpfile you’ll see that there is defined empty class wich extendsKohana_Controllerclass. That means you can overwriteControllerclass.Make your own Controller class located
APPPATH/classes/controller.php(kohana will always search file inAPPPATHfirst).$this->myMethod()will be available in all your controllers and nothing from Kohanas core will be lost.