Question

I'm new to zend framework and I want to ask if is it possible to have a base controller that will be extended by all other controllers? I want to have a base class wherein I'll put all common methods and properties for all controllers I'll have on my project. Is it advisable to do this with zend or is there a better approach to this?

Was it helpful?

Solution

You could just make a base class which extends Zend_Controller_Action. Then use that as the base class for all of your controllers.

Although, depending on what you want to do, it might be more appropriate to make Action helpers for the kind of functionality you want in every controller.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top