Here are a few exaxmples of how to use Phalcon DevTools (Developer Tools) on Wamp Server (Windows). Installing it is quite straight forward as mention in DevTools instructions. Make sure that you have setup the DevTools and added that directory to your PATH environment variable. For example, we have installed our DevTools in a directory called D:\Wamp\www\phalcon. To create a project, controller etc go to Command prompt (DOS prompt) on Windows or appropriate Linux/Unix directory and execute the appropriate command from below list. Execute the phalcon batch command in your Web server root (D:\Wamp\www) or inside the project directory with appropriate option.

To check out the commands (options) available in phalcon command execute it without any options.

To check suboptions of any command of phalcon mentioned above specify the option from the above list without any other arguments.

C:\Wamp\www\test>phalcon controller

Phalcon DevTools (3.0.1)

Help: Creates a controller

Usage: controller [name] [directory]

Arguments: help Shows this help text

Options: --name=s Controller name --namespace=s Controller's namespace [option] --directory=s Base path on which project is located [optional] --output=s Directory where the controller should be created [optional] --base-class=s Base class to be inherited by the controller [optional] --force Force to rewrite controller [optional]

To create a project go to Command prompt (DOS prompt) on Windows and execute the below command. Execute the phalcon batch command in your Web server root (D:\Wamp\www) with option to create a new project, this should create the project directory and also create the directory structure for all project files. This command also creates a file called .phalcon in the project directory which tells phalcon that this is a DevTools created directory.

To create a model with column maps and with a namespace. Column maps are required if you want to use the "assign" function to map all the fields from POST array into a model. Using "assign" function can drastically reduce your code size.

To create all the files corresponding to a database table (model) with separate namespaces for models and controllers use the "scaffold" option with "ns-models" and "ns-controllers". Note: "--mapcolumn" option doesn't work with "scaffold" so its better to generate the model separately.