web/lib/Zend/Application/Bootstrap/BootstrapAbstract.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
equal deleted inserted replaced
805:5e7a0fedabdf 807:877f952ae2bd
    13  * to license@zend.com so we can send you a copy immediately.
    13  * to license@zend.com so we can send you a copy immediately.
    14  *
    14  *
    15  * @category   Zend
    15  * @category   Zend
    16  * @package    Zend_Application
    16  * @package    Zend_Application
    17  * @subpackage Bootstrap
    17  * @subpackage Bootstrap
    18  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    20  * @version    $Id: BootstrapAbstract.php 23278 2010-10-30 12:50:21Z ramon $
    20  * @version    $Id: BootstrapAbstract.php 24593 2012-01-05 20:35:02Z matthew $
    21  */
    21  */
    22 
    22 
    23 /**
    23 /**
    24  * Abstract base class for bootstrap classes
    24  * Abstract base class for bootstrap classes
    25  *
    25  *
    26  * @uses       Zend_Application_Bootstrap_Bootstrapper
    26  * @uses       Zend_Application_Bootstrap_Bootstrapper
    27  * @uses       Zend_Application_Bootstrap_ResourceBootstrapper
    27  * @uses       Zend_Application_Bootstrap_ResourceBootstrapper
    28  * @category   Zend
    28  * @category   Zend
    29  * @package    Zend_Application
    29  * @package    Zend_Application
    30  * @subpackage Bootstrap
    30  * @subpackage Bootstrap
    31  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    31  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    32  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    32  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    33  */
    33  */
    34 abstract class Zend_Application_Bootstrap_BootstrapAbstract
    34 abstract class Zend_Application_Bootstrap_BootstrapAbstract
    35     implements Zend_Application_Bootstrap_Bootstrapper,
    35     implements Zend_Application_Bootstrap_Bootstrapper,
    36                Zend_Application_Bootstrap_ResourceBootstrapper
    36                Zend_Application_Bootstrap_ResourceBootstrapper
   350                     return $this->_pluginResources[$pluginName];
   350                     return $this->_pluginResources[$pluginName];
   351                 }
   351                 }
   352                 continue;
   352                 continue;
   353             }
   353             }
   354 
   354 
   355             if (class_exists($plugin)) { //@SEE ZF-7550
   355             if (class_exists($plugin)
       
   356             && is_subclass_of($plugin, 'Zend_Application_Resource_Resource')
       
   357             ) { //@SEE ZF-7550
   356                 $spec = (array) $spec;
   358                 $spec = (array) $spec;
   357                 $spec['bootstrap'] = $this;
   359                 $spec['bootstrap'] = $this;
   358                 $instance = new $plugin($spec);
   360                 $instance = new $plugin($spec);
   359                 $pluginName = $this->_resolvePluginResourceName($instance);
   361                 $pluginName = $this->_resolvePluginResourceName($instance);
   360                 unset($this->_pluginResources[$plugin]);
   362                 unset($this->_pluginResources[$plugin]);
   412      */
   414      */
   413     public function getPluginLoader()
   415     public function getPluginLoader()
   414     {
   416     {
   415         if ($this->_pluginLoader === null) {
   417         if ($this->_pluginLoader === null) {
   416             $options = array(
   418             $options = array(
   417                 'Zend_Application_Resource' => 'Zend/Application/Resource'
   419                 'Zend_Application_Resource'  => 'Zend/Application/Resource',
       
   420                 'ZendX_Application_Resource' => 'ZendX/Application/Resource'
   418             );
   421             );
   419 
   422 
   420             $this->_pluginLoader = new Zend_Loader_PluginLoader($options);
   423             $this->_pluginLoader = new Zend_Loader_PluginLoader($options);
   421         }
   424         }
   422 
   425