Skip to content

Instantly share code, notes, and snippets.

@boxers999
Created March 5, 2011 17:30
Show Gist options
  • Save boxers999/856527 to your computer and use it in GitHub Desktop.
Save boxers999/856527 to your computer and use it in GitHub Desktop.
A fairly simple get you going bootstrap
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initAutoload()
{
$autoloader = new Zend_Loader_Autoloader_Resource(array(
'namespace' => '',
'basePath' => APPLICATION_PATH,
'resourceTypes' => array(
'form' => array(
'path' => 'forms',
'namespace' => 'Form',
),
'model' => array(
'path' => 'models',
'namespace' => 'Model',
),
)
));
return $autoloader;
}
protected function _initFc() {
Zend_Controller_Front::getInstance()->setParam('env', APPLICATION_ENV);
#Zend_Controller_Front::getInstance()->registerPlugin(new ADD YOUR PLUGIN CLASS HERE);
}
protected function _initConfig() {
$config = new Zend_Config_Ini(APPLICATION_PATH.'/configs/application.ini', APPLICATION_ENV);
$registry = Zend_Registry::getInstance();
$registry->configuration = $config;
}
protected function _initDoctype() {
$this->bootstrap('view');
$view = $this->getResource('view');
$view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
$view->doctype('XHTML1_STRICT');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment