Search code examples
phpzend-frameworkzend-controller

Zend Framework: extend custom base controller from Zend_Controller_Action


I want my controllers to be extended from my base controller (no from Zend_Controller_Action).

How can I extend my base Contoller from Zend_Contoller_Action. And where this custom base controller to be placed so it will be accessible to other contollers.

Thanks in advance


Solution

  • To extend write:

    abstract class Mylib_YourBaseController extends Zend_Contoller_Action{
    }
    

    Create a directory called Mylib in the same place the Zend library is, that's it.