With a stable version of Zend Framework 2 on the horizon, we have been slowly implementing some ZF2 components, changing conventions, implementing namespaces, etc. It would be nice to have all of our controllers namespaced prior to the move, just to simply things, but I haven’t found a good way to accomplish that goal.
Does anyone have any suggestions on controller namespacing in ZF1? I don’t mind editing the ZF1 library files at this point.
namespace Product;
use Zend_Controller_Action as AbstractActionController;
class IndexController extends AbstractActionController
{}
Took a while, but I found that this can be done with a custom dispatcher:
Then somewhere in the entry point to the application: