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:

  1. A controller in /application/controller/MenuController.php
  2. An indexAction in the MenuController file
  3. A view script in /view/scripts/menu/index.phtml
  4. An update for the project file: .zfproject.xml

All that in a single line.

Interesting, isn’t it?