예제 #1
0
 public function testplugin生成時に複数の引数を設定できる()
 {
     $iniPath = GENE_TEST_ROOT . '/var/config/plugin.ini';
     $config = Gene_Config::load($iniPath);
     $plugin = new Gene_Application_Setting_Plugin($config);
     $plugins = $plugin->load()->getPlugin();
     $args = $plugins['foo']->getArgs();
     $this->assertEquals($args, $config->plugin->foo->args->toArray());
 }
예제 #2
0
 /**
  * Init plugin
  *
  * @access protected
  * @return Gene_Bootstrap Fluent interface
  */
 protected function _initPlugin()
 {
     // Load plugin
     $path = $this->_configPath . 'plugin.ini';
     $config = Gene_Config::load($path, $this->_cache);
     if (is_null($config)) {
         return $this;
     }
     $plugin = new Gene_Application_Setting_Plugin($config);
     // Register plugin to frontcontroller.
     $front = Zend_Controller_Front::getInstance();
     $plugins = $plugin->load()->getPlugin();
     foreach ($plugins as $key => $val) {
         $front->registerPlugin($val);
     }
     return $this;
 }