예제 #1
0
 public function provider()
 {
     $pluginName = 'plugin';
     $plugin = m::mock('plugin', array('init' => null, 'getName' => $pluginName, 'isMultipleInstanced' => false));
     $pluginRegistry = new PluginRegistry();
     $pluginRegistry->addPlugin($plugin);
     return array(array($pluginRegistry, $pluginName, $plugin));
 }
예제 #2
0
파일: Poc.php 프로젝트: flyingwhale/poc
 /**
  *
  * @param \FlyingWhale\Plugin\PluginInterface $plugin
  */
 public function addPlugin($plugin)
 {
     $this->pluginRegistry->addPlugin($plugin);
     $plugin->init($this);
 }