Пример #1
0
 /**
  * Constructor
  *
  * Ensure frontcontroller resource is registered
  *
  * @param  Zend_Application|\Zend\Application\Bootstrapper $application
  * @return void
  */
 public function __construct($application)
 {
     parent::__construct($application);
     if ($application->hasOption('resourceloader')) {
         $this->setOptions(array('resourceloader' => $application->getOption('resourceloader')));
     }
     $this->getResourceLoader();
     if (!$this->hasPluginResource('frontcontroller')) {
         $this->registerPluginResource('frontcontroller');
     }
 }
Пример #2
0
 /**
  * Constructor
  *
  * Ensure frontcontroller resource is registered
  *
  * @param  Zend_Application|\Zend\Application\Bootstrapper $application
  * @return void
  */
 public function __construct($application)
 {
     parent::__construct($application);
     $options = array();
     if ($application->hasOption('resourceloader')) {
         $options['resourceloader'] = $application->getOption('resourceloader');
     }
     if ($application->hasOption('resource_broker')) {
         $options['broker'] = $application->getOption('resource_broker');
     }
     $this->setOptions($options);
     $this->getResourceLoader();
     if (!$this->hasResource('frontcontroller')) {
         $broker = $this->getBroker();
         if (!$broker->hasPlugin('frontcontroller')) {
             $broker->registerSpec('frontcontroller');
         }
     }
 }