Ejemplo n.º 1
0
 /**
  * Unregister a plugin.
  *
  * @param  string|\Zend\Controller\Plugin\AbstractPlugin $plugin Plugin class or object to unregister
  * @return \Zend\Controller\Front
  */
 public function unregisterPlugin($plugin)
 {
     $this->_plugins->unregisterPlugin($plugin);
     return $this;
 }
Ejemplo n.º 2
0
 public function testUnregisterPluginByClassName()
 {
     $broker = new Plugin\Broker();
     $plugin = new TestPlugin();
     $broker->registerPlugin($plugin);
     $plugins = $broker->getPlugins();
     $this->assertEquals(1, count($plugins));
     $broker->unregisterPlugin('ZendTest\\Controller\\Plugin\\TestPlugin');
     $plugins = $broker->getPlugins();
     $this->assertEquals(0, count($plugins));
 }