I'm currently using the ZendFrameworkSkeleton application from Git and am trying to utilize the module part of it to have a multitude of modules, changeable by URL like so:
http://localhost/application/index/index/
http://localhost/guestbook/index/index/
http://localhost/forum/index/index/
Also, how would you use language in there as well for future expansion:
http://localhost/en/application/index/index/
http://localhost/de/application/index/index/
http://localhost/en/forum/index/index/
I would have thought this was pretty much the whole point of ZF2 Modules and am surprised it doesn't seem to work out of the box. Anyone got any idea how this is meant to be done or perhaps a link to an example/tutorial of it?
At the moment it appears that the Router is within each Module rather than the entire entire Application, which I would have thought was how it should be done... I'm sort of guessing that you have one Application module that does the routing and the global stuff, injecting dependencies and what not and then other modules for the different stuff like game, account, guestbook, forum etc.
Once I've figured it out I can make a Github example application of it as I know other people are curious about it.
Edit @ 24/11/2011: I've since come across a post by EvanDotPro on the contributor forum about them talking about them not wanting to do the ZF1 module/controller/action way of doing things and that there wasn't that much demand for it. He actually wrote an example that had it running something like this but said it didn't work 100%. So anyone who comes across this post looking for more information and are a little more savvy then this is it: https://github.com/EvanDotPro/EdpMagicRoute
(if it still exists at point of reading this!)
I found nice example on github https://github.com/akrabat/zf2-tutorial + pdf with explanation http://akrabat.com/wp-content/uploads/Getting-Started-with-Zend-Framework-2.pdf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With