当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Config_Ini::__construct方法代码示例

本文整理汇总了PHP中Zend_Config_Ini::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Config_Ini::__construct方法的具体用法?PHP Zend_Config_Ini::__construct怎么用?PHP Zend_Config_Ini::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Config_Ini的用法示例。


在下文中一共展示了Zend_Config_Ini::__construct方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

 function __construct($filename, $section = null, $options = false)
 {
     $this->iniDataBackup = $this->iniData = $this->_parseRawIniFile($filename);
     $this->configfilename = $filename;
     //print_r(  array_keys($this->iniData["development : production"]) );
     parent::__construct($filename, $section, $options);
 }
开发者ID:hugi2002,项目名称:mylibrary,代码行数:7,代码来源:Ini.php

示例2: __construct

 public function __construct($filePath)
 {
     if (!file_exists($filePath)) {
         file_put_contents($filePath, '');
     }
     $this->filePath = $filePath;
     parent::__construct($filePath, null, true);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:8,代码来源:KalturaUnitTestConfig.php

示例3: __construct

 /**
  * 
  * Creates a new test configuration
  * @param unknown_type $filePath
  */
 public function __construct($filePath = null)
 {
     if (empty($filePath)) {
         $this->_allowModifications = true;
         return;
     }
     if (!file_exists($filePath)) {
         KalturaLog::debug("Test configuration doesn't exists [{$filePath}] creating new ");
         file_put_contents($filePath, '');
     }
     $this->filePath = $filePath;
     parent::__construct($filePath, null, true);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:18,代码来源:KalturaTestConfig.php

示例4: __construct

 public function __construct($configFileName, $workerName, $maxInstances)
 {
     parent::__construct($configFileName, $workerName, true);
     $this->name = $workerName;
     $this->maxInstances = $maxInstances;
     if ($this->filter) {
         $filter = new KalturaBatchJobFilter();
         foreach ($this->filter as $attr => $value) {
             $filter->{$attr} = $value;
         }
         $this->filter = $filter;
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:13,代码来源:KSchedularTaskConfig.class.php

示例5: __construct

 /**
  * If $config['create'] = true the config will be create if he doesn't exist.
  *
  * @param string Path to config file
  * @param string Section of config file
  * @param array Configuration array
  * @throw USVN_Exception
  */
 public function __construct($filename, $section, $config = array())
 {
     $this->_filename = $filename;
     if (!file_exists($filename)) {
         if (isset($config['create']) && $config['create'] === true) {
             if (@file_put_contents($filename, "[{$section}]\n") === false) {
                 throw new USVN_Exception("Can't write config file %s.", $filename);
             }
         } else {
             throw new USVN_Exception("Can't open config file %s.", $filename);
         }
     }
     try {
         parent::__construct($filename, $section, true);
     } catch (Exception $e) {
         throw new USVN_Exception($e->getMessage());
     }
 }
开发者ID:jiangti,项目名称:usvn,代码行数:26,代码来源:Ini.php

示例6: __construct

 public function __construct($filename, $section = null, $options = false)
 {
     $options['allowModifications'] = true;
     try {
         parent::__construct($filename, $section, $options);
     } catch (Zend_Config_Exception $e) {
         // Catch invalid Section exceptions here...
         if (!count(sscanf($e->getMessage(), "Section '%s' cannot be found in %s"))) {
             throw $e;
         }
         // ...and provide a better one we can use to show a friendly error
         $validSections = array_keys($this->_loadIniFile($filename));
         $superException = new Garp_Config_Ini_InvalidSectionException($e->getMessage());
         $superException->setValidSections($validSections);
         throw $superException;
     }
     if (isset($this->config)) {
         $this->_mergeSubConfigs($section, $options);
     }
 }
开发者ID:grrr-amsterdam,项目名称:garp3,代码行数:20,代码来源:Ini.php

示例7: load

 public function load()
 {
     $this->configTimestamp = $this->calculateFileTimestamp();
     $configFileName = $this->configFileName;
     KalturaLog::log("loading configuration {$configFileName} at " . $this->configTimestamp);
     if (is_dir($this->configFileName)) {
         $configFileName = kEnvironment::get('cache_root_path') . DIRECTORY_SEPARATOR . 'batch' . DIRECTORY_SEPARATOR . 'config.ini';
         $this->implodeDirectoryFiles($configFileName);
     }
     $hostname = self::getHostname();
     parent::__construct($configFileName, $hostname, true);
     $this->name = $hostname;
     $this->hostName = $hostname;
     $this->taskConfigList = array();
     foreach ($this->enabledWorkers as $workerName => $maxInstances) {
         if (!$maxInstances) {
             continue;
         }
         $task = new KSchedularTaskConfig($configFileName, $workerName, $maxInstances);
         $task->setPartnerId($this->getPartnerId());
         $task->setSecret($this->getSecret());
         $task->setCurlTimeout($this->getCurlTimeout());
         $task->setSchedulerId($this->getId());
         $task->setSchedulerName($this->getName());
         $task->setServiceUrl($this->getServiceUrl());
         $task->setDwhPath($this->getDwhPath());
         $task->setDirectoryChmod($this->getDirectoryChmod());
         $task->setChmod($this->getChmod());
         $task->setDwhEnabled($this->getDwhEnabled());
         $task->setTimezone($this->getTimezone());
         $task->setInitOnly(false);
         $task->setRemoteServerUrl($this->getRemoteServerUrl());
         $task->setMaxIdleTime($this->getMaxIdleTime());
         $this->taskConfigList[$workerName] = $task;
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:36,代码来源:KSchedulerConfig.class.php

示例8: __construct

 public function __construct()
 {
     $this->_fileConfig = FILE_PATH . DS . 'Configs' . DS . 'site.ini';
     parent::__construct($this->_fileConfig, null, array('allowModifications' => true));
 }
开发者ID:kytvi2p,项目名称:ZettaFramework,代码行数:5,代码来源:Settings.php

示例9: __construct

 /**
  * Loads the section $section from the array $config for
  * access facilitated by nested object properties.
  *
  *
  * @param  array         $config
  * @param  string|null   $section
  * @param  boolean|array $options
  * @throws Zend_Config_Exception
  * @return void
  */
 public function __construct(array $config, $section = null, $options = false)
 {
     parent::__construct($config, $section, $options);
 }
开发者ID:ThorstenSuckow,项目名称:conjoon,代码行数:15,代码来源:Array.php


注:本文中的Zend_Config_Ini::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。