public function testUnregisterPluginByClassName() { $broker = new Zend_Controller_Plugin_Broker(); $plugin = new Zend_Controller_Plugin_BrokerTest_TestPlugin(); $broker->registerPlugin($plugin); $plugins = $broker->getPlugins(); $this->assertEquals(1, count($plugins)); $broker->unregisterPlugin('Zend_Controller_Plugin_BrokerTest_TestPlugin'); $plugins = $broker->getPlugins(); $this->assertEquals(0, count($plugins)); }
/** * Unregister a plugin. * * @param string|Zend_Controller_Plugin_Abstract $plugin Plugin class or object to unregister * @return Zend_Controller_Front */ public function unregisterPlugin($plugin) { $this->_plugins->unregisterPlugin($plugin); return $this; }
/** * Unregister a plugin. * * @param Zend_Controller_Plugin_Abstract $plugin * @return Zend_Controller_Front */ public function unregisterPlugin(Zend_Controller_Plugin_Abstract $plugin) { $this->_plugins->unregisterPlugin($plugin); return $this; }
/** * Unregister a plugin. * * @return Zend_Controller_Front */ public function unregisterPlugin(Zend_Controller_Plugin_Interface $plugin) { $this->_plugins->unregisterPlugin($plugin); return $this; }