[sourcecode]zf.sh create project rsvp[/sourcecode]
[sourcecode]ln -s /path/to/ZendFramework-1.11.11-minimal/library/Zend .[/sourcecode]
[sourcecode]deny from all[/sourcecode]
[sourcecode]
RewriteRule (.*) ./public/$1
[/sourcecode]
Second, we can edit configs/application.ini and add a line
[sourcecode]settings.baseUrl = "/rsvp"[/sourcecode]
Third, edit Bootstrap.php and add a function
[sourcecode]
protected function _initBaseUrl()
{
$options = $this->getOptions();
$baseUrl = isset($options[‘settings’][‘baseUrl’])
? $options[‘settings’][‘baseUrl’]
: null; // null tells front controller to use autodiscovery, the default
$this->bootstrap(‘frontcontroller’);
$front = $this->getResource(‘frontcontroller’);
$front->setBaseUrl($baseUrl);
}
[/sourcecode]
[sourcecode]zf.sh enable layout[/sourcecode]
and then edit application/layouts/layout.phtml to add necessary header/footer inclusion.
[sourcecode]
resources.db.adapter = PDO_MYSQL
resources.db.params.host = localhost
resources.db.params.username = my_username
resources.db.params.password = my_password
resources.db.params.dbname = my_db
[/sourcecode]
[sourcecode]zf.sh create controller controllername[/sourcecode]
[sourcecode]
zf.sh create action add controllername
zf.sh create action edit controllername
zf.sh create action delete controllername
[/sourcecode]
[sourcecode]
zf.sh create db-table controlername db_table_name
[/sourcecode]
and then modify application/models/DbTable/ProjectName.php to add CRUD DB functions.