Пример #1
0
 /**
  * Get source from config
  * @return string
  */
 public function getSource()
 {
     $config = Core_Module_Config::getConfig('application');
     if (APPLICATION_ENV == 'testing') {
         $source = $config['testing']['resources']['navigation']['source'];
     } else {
         $source = $config['production']['resources']['navigation']['source'];
     }
     if (isset($source[$this->_section])) {
         return $source[$this->_section];
     } else {
         return null;
     }
 }
Пример #2
0
 /**
  * get config
  *
  * @return array
  */
 protected function _getConfig()
 {
     $bootstrap = $this->getBootstrap();
     $cache = false;
     if (!empty($this->_options['cache'])) {
         if ($bootstrap->hasPluginResource('CacheManager')) {
             $manager = $bootstrap->bootstrap('CacheManager')->getResource('CacheManager');
             $cache = $manager->getCache($this->_options['cache']);
         }
     }
     $config = empty($this->_options['config']) ? $this->_config : $this->_options['config'];
     return new Zend_Config(Core_Module_Config::getConfig($config, null, Core_Module_Config::MAIN_ORDER_LAST, $cache));
 }
Пример #3
0
 /**
  * get config
  *
  * @return array
  */
 protected function _getConfig()
 {
     $bootstrap = $this->getBootstrap();
     $cache = false;
     if ($this->_cache) {
         if ($bootstrap->hasPluginResource('CacheManager')) {
             $manager = $bootstrap->bootstrap('CacheManager')->getResource('CacheManager');
             $cache = $manager->getCache($this->_options['cache']);
         }
     }
     return Core_Module_Config::getConfig($this->_config, null, Core_Module_Config::MAIN_ORDER_FIRST, $cache);
 }
Пример #4
0
 /**
  * Gets config array from file
  *
  * @return array
  */
 private function _getConfig()
 {
     if (!$this->_configArray) {
         $this->_configArray = Core_Module_Config::getConfig($this->_config, null, Core_Module_Config::MAIN_ORDER_FIRST, $this->_cache);
     }
     return $this->_configArray;
 }
Пример #5
0
 /**
  * get config
  *
  * @return array
  */
 protected function _getConfig()
 {
     return Core_Module_Config::getConfig($this->_config, null, Core_Module_Config::MAIN_ORDER_FIRST, $this->_cache);
 }