Wednesday, September 29, 2010

Creating a module in a Zend Framework web application

Zend Framework MVC web application request dispatch mechanism is structured in modules (optional), then controllers, and finally actions.

You have to enable module support.

Then to create a module, use zf create module command line tool.

$ zf create module deposit Creating the following module and artifacts: /home/ceefour/zendapp/application/modules/deposit/controllers /home/ceefour/zendapp/application/modules/deposit/models /home/ceefour/zendapp/application/modules/deposit/views /home/ceefour/zendapp/application/modules/deposit/views/scripts /home/ceefour/zendapp/application/modules/deposit/views/helpers /home/ceefour/zendapp/application/modules/deposit/views/filters Updating project profile '/home/ceefour/zendapp/.zfproject.xml'

Then you can create controllers, actions, and view templates as usual.

No comments:

Post a Comment