An easy way to create a new Controller is by doing this with the command line.
On Windows, open a new terminal (SHIFT + right click on your project directory) and write this:
$ TheProjectDirectory> CompletePathUntil\ZendFramework-1.11.7\bin\zf.bat create controller Menu
It will create:
- A controller in /application/controller/MenuController.php
- An indexAction in the MenuController file
- A view script in /view/scripts/menu/index.phtml
- An update for the project file: .zfproject.xml
All that in a single line.
Interesting, isn’t it?