Question

I'm working on a Zend project where there is a need to make it easily extendable. Having considered various options, I think it would work best if these extensions used the same MVC structure as generic Zend modules but were grouped together in a seperate folder away from the core modules.

So the structure I would ideally like would be something like:

application
  configs
  core
    module1
    module2
  extensions
    extensionModule1
    extensionModule2

Then with this structure I'd like urls such as module1/controller/action and extensionModule1/controller/action to both work at the same time.

So is it possible to setup multiple module directories for the router to look in?

If this isn't possible, then any suggestions of another way to implement extensions that use MVC and are seperate from the core part of the site would be greatly appreciated.

Thanks for the help.

Was it helpful?

Solution

open your application.ini do

resources.frontController.moduleDirectory[] = APPLICATION_PATH "/core"
resources.frontController.moduleDirectory[] = APPLICATION_PATH "/extensions"
resources.modules = true;

ZF will look in both the directories and will consider all there sub directories as modules.

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