protected function _initPlugins()
 {
     $this->bootstrap('frontController');
     $pluginsLoader = new Zend_Loader_PluginLoader();
     $pluginsLoader->addPrefixPath("Plugin", APPLICATION_PATH . '/plugins');
     $pluginsLoader->load("Layout");
     if ($pluginsLoader->isLoaded("Layout")) {
         $front = Zend_Controller_Front::getInstance()->registerPlugin(new Plugin_Layout());
     }
     $pluginsLoader->load("Acl");
     if ($pluginsLoader->isLoaded("Acl")) {
         $front = Zend_Controller_Front::getInstance()->registerPlugin(new Plugin_Acl());
     }
 }
 public function _initPlugins()
 {
     $this->bootstrap('frontController');
     $pluginsLoader = new Zend_Loader_PluginLoader();
     $pluginsLoader->addPrefixPath("Plugin", APPLICATION_PATH . '/plugins');
     $pluginsLoader->load("PageModule");
     if ($pluginsLoader->isLoaded('PageModule')) {
         Zend_Controller_Front::getInstance()->registerPlugin(new Plugin_PageModule());
     }
 }
 protected function _initPlugins()
 {
     $this->bootstrap('frontController');
     $pluginsLoader = new Zend_Loader_PluginLoader();
     $pluginsLoader->addPrefixPath('Plugin', $this->getResourceLoader()->getBasePath() . '/plugins');
     $pluginsLoader->load("LayoutLoader");
     $pluginsLoader->load("AclUtils");
     if ($pluginsLoader->isLoaded('LayoutLoader')) {
         Zend_Controller_Front::getInstance()->registerPlugin(new Plugin_LayoutLoader());
     }
 }
Exemple #4
0
 public function testLoadPluginStaticallyLoadsClass()
 {
     $this->key = 'foobar';
     $loader = new Zend_Loader_PluginLoader(array(), $this->key);
     $loader->addPrefixPath('Zend_View_Helper', $this->libPath . '/Zend/View/Helper');
     try {
         $className = $loader->load('FormRadio');
     } catch (Exception $e) {
         $paths = $loader->getPaths();
         $this->fail(sprintf("Failed loading helper; paths: %s", var_export($paths, 1)));
     }
     $this->assertEquals('Zend_View_Helper_FormRadio', $className);
     $this->assertTrue(class_exists('Zend_View_Helper_FormRadio', false));
     $this->assertTrue($loader->isLoaded('FormRadio'));
 }