Esempio n. 1
0
 /**
  * Получает настройки CDN плагина с адресами
  * @throws Invalid json
  * @throws Input file does not exist
  */
 public function _getConfig()
 {
     $json = new Evil_Json($this->cdn_json_path);
     $this->_config = $json->toArray();
     $this->_json = $json;
     /*		$path = "../ocweb/application/configs/cdn.json";
     		$json_content = file_get_contents($path);
     		$json = new Zend_Json();
     		$this->_config = $json->decode($json_content);	
     		return $json;*/
 }
Esempio n. 2
0
 /**
  * Инициализация
  * Считывает настрокйи application.ini
  */
 public function _getConfig()
 {
     /*		//получаем ссылку на хранилище настроек
     		try {
     			$config = Zend_Registry::get('config');
     		} catch (Exception $e) {
     			throw new Exception('Helper CDN не смог получить доступ к настройкам в Application.ini', 500);
     		}	
     		
     		$this->_config = $config['evil']['CDN'];	*/
     //$json = file_get_contents(APPLICATION_PATH . "/config/cdn.json");
     $path = APPLICATION_PATH . "/configs/cdn.json";
     $json = new Evil_Json($path);
     $this->_config = $json->toArray();
     return $json;
 }