import v1.1.0_beta1 | 2009-08-21

This commit is contained in:
2019-07-17 22:16:19 +02:00
parent 2c1152f0d3
commit 8dee6b1a10
2306 changed files with 251360 additions and 23428 deletions

View File

@ -19,10 +19,6 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
/** Zend_Controller_Exception */
require_once 'Zend/Controller/Exception.php';
/** Zend_Controller_Plugin_Abstract */
require_once 'Zend/Controller/Plugin/Abstract.php';
@ -54,6 +50,7 @@ class Zend_Controller_Plugin_Broker extends Zend_Controller_Plugin_Abstract
public function registerPlugin(Zend_Controller_Plugin_Abstract $plugin, $stackIndex = null)
{
if (false !== array_search($plugin, $this->_plugins, true)) {
require_once 'Zend/Controller/Exception.php';
throw new Zend_Controller_Exception('Plugin already registered');
}
@ -61,6 +58,7 @@ class Zend_Controller_Plugin_Broker extends Zend_Controller_Plugin_Abstract
if ($stackIndex) {
if (isset($this->_plugins[$stackIndex])) {
require_once 'Zend/Controller/Exception.php';
throw new Zend_Controller_Exception('Plugin with stackIndex "' . $stackIndex . '" already registered');
}
$this->_plugins[$stackIndex] = $plugin;
@ -98,6 +96,7 @@ class Zend_Controller_Plugin_Broker extends Zend_Controller_Plugin_Abstract
// Given a plugin object, find it in the array
$key = array_search($plugin, $this->_plugins, true);
if (false === $key) {
require_once 'Zend/Controller/Exception.php';
throw new Zend_Controller_Exception('Plugin never registered.');
}
unset($this->_plugins[$key]);