Reputation: 103
Be easy on me... I'm brand new to the Zend framework!
Im trying to figure out the best way to create a CMS using Zend which is extendable with modules. These are modules for the CMS not necessarily a module for Zend. For example, there could be an event registration module, photo gallery module, etc. I want each module to define its own URIs instead of in an _initRoutes() in bootstrap.php. This allows each module to be an independent unit like they are in any CMS. The thought is that there could be a hook in a module's main controller defining URI info which is then cached in the database and used by the router.
A few specific questions:
Again, I'm new to Zend and just trying to figure out the basics. Any input is greatly appreciated!
Upvotes: 0
Views: 353
Reputation: 33148
Should the front controller route requests to a module 'front controller' / main controller which routes the request to a specific controller/action within the module?
No, you should only ever have one front controller.
Is there a better way than using a hook for a module to define URIs?
If you make each module a ZF module, you can create module-specific bootstrap classes. In each module bootstrap class you can then add an _initRoutes() method which defines the routes for that module alone.
Upvotes: 1