Zend Tool Cheat Sheet (v1.11.10)
Usage:
zf [--global-opts] action-name [--action-opts] provider-name [--provider-opts] [provider parameters ...]
Note: You may use “?” in any place of the above usage string to ask for more specific help information.
Example: “zf ? version” will list all available actions for the version provider.Providers and their actions:
| Version zf show version mode[=mini] name-included[=1] Note: There are specialties, use zf show version.? to get specific help on them.Config zf create config zf show config zf enable config Note: There are specialties, use zf enable config.? to get specific help on them. zf disable config Note: There are specialties, use zf disable config.? to get specific help on them. Phpinfo Manifest Profile Project Application Model |
View Controller Action Module Form Layout DbAdapter DbTable ProjectProvider |
Examples (Windows): zf create project ./ zf create module test zf create controller Test index-action-included=1 test
Remarks:
- The Zend Tool will maintain a xml based configuration file called ‘.zfproject.xml’, do not remove!
- Zend Tool is case sensitive, thus “zf create module blog” and “zf create module Blog” are different commands, running them both will create 2 modules (in Windows it will only result in 1 module directory though!)
- The create module command did not create a module Bootstrap file
- The bootstrap file in the tests directory has a lowercase ‘b’ which probably needs to be an uppercase like ‘Bootstrap.php’
- Note: PHPUnit is required in order to generate controller test stubs.
- For a module Bootstrap to work, the application.ini needs resources.modules = ""
A simple module Bootstrap looks like:
<?php
class Yourmodulename_Bootstrap extends Zend_Application_Module_Bootstrap {
protected function _initSomething () {
}
}
Nicely done and a good reference, thanks!