I'm trying out the module-based architecture for my application, where the default
module is what used to be the main application before.
modules/
default/
firstmodule
secondmodule
thirdmodule
Each module has its models, views, controllers
. This is the default module as an example.
default/
models
views
controllers
IndexController
My problem is with the ErrorController
that zend creates by default at application/controllers/ErrorController.php
. I'd like to move it into the default
module's controllers folder, but I wonder if it needs any special treatment, being the ErrorController and all?
Should I move it to modules/default/controllers/ErrorController.php
,
or should I leave it at application/controllers/ErrorController.php
Edit: If I move it to default/controllers, then each of the other modules would not have an ErrorController. Does that mean that I'd have to define one for each module since the application itself doesn't have an ErrorController? and is it worth it to define one for each module?