Created
September 20, 2012 08:57
-
-
Save dbaltas/3754762 to your computer and use it in GitHub Desktop.
Bootstrap updates for Centurion integration in existing Zend Framework Application
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
+ $opts = Zend_Registry::get('config')->centurion->toArray(); | |
+ Centurion_Config_Manager::set('centurion.auth_profile', $opts['auth_profile']); | |
+ $translation = Zend_Registry::get('config')->translation->toArray(); | |
+ Centurion_Config_Manager::set('translation', $translation); | |
+ Centurion_Config_Manager::set('resources', Zend_Registry::get('config')->resources); | |
} | |
protected function _initView() | |
{ | |
+ Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer')->setView(new Centurion_View); | |
+ $view->addHelperPath($this->_docRoot . '/library/Centurion/Contrib/core/views/helpers', 'Centurion_View_Helper_'); | |
+ $view->addHelperPath($this->_docRoot . '/library/Centurion/Contrib/admin/views/helpers', 'Admin_View_Helper_'); | |
$view->addScriptPath($this->getLayoutPath()); | |
+ $view->addScriptPath(realpath(APPLICATION_PATH . '/../library/Centurion/Contrib/core/views/scripts')); | |
+ $view->addScriptPath(realpath(APPLICATION_PATH . '/../library/Centurion/Contrib/admin/views/scripts')); | |
+ Zend_Controller_Action_HelperBroker::addPrefix('Centurion_Controller_Action_Helper'); | |
+ Zend_Controller_Action_HelperBroker::addHelper(new Centurion_Controller_Action_Helper_AuthCheck); | |
} | |
+ protected function _initContrib() | |
+ { | |
+ $this->bootstrap('FrontController'); | |
+ $this->getResource('FrontController')->addModuleDirectory(APPLICATION_PATH . '/../library/Centurion/Contrib'); | |
+ } | |
+ | |
+ protected function _initModules() | |
+ { | |
+ $this->getPluginResource('modules')->init(); | |
+ } | |
+ | |
+ public function getPluginLoader() | |
+ { | |
+ if ($this->_pluginLoader === null) { | |
+ $options = array( | |
+ 'Zend_Application_Resource' => 'Zend/Application/Resource', | |
+ 'Centurion_Application_Resource' => 'Centurion/Application/Resource', | |
+ ); | |
+ | |
+ $this->_pluginLoader = new Centurion_Loader_PluginLoader($options, 'Bootstrap'); | |
+ } | |
+ | |
+ return $this->_pluginLoader; | |
+ } | |
+ | |
+ protected function _initHelper() | |
+ { | |
+ $this->bootstrap('FrontController'); | |
+ Zend_Controller_Action_HelperBroker::addHelper(new Centurion_Controller_Action_Helper_LayoutLoader()); | |
+ Zend_Controller_Action_HelperBroker::addHelper(new Centurion_Controller_Action_Helper_DbAutoFiltersSwitch()); | |
+ } | |
} | |
: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment