Created
March 5, 2011 17:30
-
-
Save boxers999/856527 to your computer and use it in GitHub Desktop.
A fairly simple get you going bootstrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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