• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Zend_Config_Ini类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: loadApplicationConfig

function loadApplicationConfig()
{
    require_once 'Zend/Config/Ini.php';
    $default = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application.ini', APPLICATION_ENV, array('allowModifications' => true));
    $options = $default->toArray();
    return $options;
}
开发者ID:HuyTran0424,项目名称:noeavrsev345452dfgdfgsg,代码行数:7,代码来源:cron.php


示例2: _initConfig

 /**
  * Initialize module config options
  * 
  * @return void
  */
 protected function _initConfig()
 {
     // load ini file
     $config = new Zend_Config_Ini(MODULES_PATH . '/' . $this->_module['folder'] . '/configs/module.ini', APPLICATION_ENV);
     $this->setOptions($config->toArray());
     Zend_Registry::set($this->_module['folder'] . 'Config', $this->_config = $config);
 }
开发者ID:esironal,项目名称:kebab-project,代码行数:12,代码来源:Bootstrap.php


示例3: __construct

    private function __construct() {
        $pathToFile = APPLICATION_PATH . '/configs/xhprof.ini';

        if (file_exists($pathToFile)) {

            $xhprofIni = new Zend_Config_Ini($pathToFile);

            if (null == ($config = $xhprofIni->get(APPLICATION_ENV)) && null == ($config = $xhprofIni->get('default'))) {
                require_once 'Zend/Application/Exception.php';
                throw new Zend_Application_Exception("Błędne ustawienia dla XHprof w pliku xhprof.ini");
            }
            
            $this->_xhprofConfigData = $config;

            if (null !== $this->_xhprofConfigData && $this->_xhprofConfigData->count() >= 1) {
                $dbAdapter = new Zend_Db_Adapter_Pdo_Pgsql(array(
                    'host' => $this->_xhprofConfigData->get('xhprof')->db->host,
                    'username' => $this->_xhprofConfigData->get('xhprof')->db->username,
                    'password' => $this->_xhprofConfigData->get('xhprof')->db->password,
                    'dbname' => $this->_xhprofConfigData->get('xhprof')->db->dbname,
                    'port' => $this->_xhprofConfigData->get('xhprof')->db->port
                ));
                $this->_dbAdapter = $dbAdapter;
            }
        }
    }
开发者ID:knatorski,项目名称:SMS,代码行数:26,代码来源:XHProfConfigFile.php


示例4: postUpgrade

 /** Post database upgrade. */
 public function postUpgrade()
 {
     /** @var SettingModel $settingModel */
     $settingModel = MidasLoader::loadModel('Setting');
     $configPath = LOCAL_CONFIGS_PATH . DIRECTORY_SEPARATOR . $this->moduleName . '.local.ini';
     if (file_exists($configPath)) {
         $config = new Zend_Config_Ini($configPath, 'global');
         $settingModel->setConfig(DICOMEXTRACTOR_DCM2XML_COMMAND_KEY, $config->get('dcm2xml', DICOMEXTRACTOR_DCM2XML_COMMAND_DEFAULT_VALUE), $this->moduleName);
         $settingModel->setConfig(DICOMEXTRACTOR_DCMJ2PNM_COMMAND_KEY, $config->get('dcmj2pnm', DICOMEXTRACTOR_DCMJ2PNM_COMMAND_DEFAULT_VALUE), $this->moduleName);
         $settingModel->setConfig(DICOMEXTRACTOR_DCMFTEST_COMMAND_KEY, $config->get('dcmftest', DICOMEXTRACTOR_DCMFTEST_COMMAND_DEFAULT_VALUE), $this->moduleName);
         $settingModel->setConfig(DICOMEXTRACTOR_DCMDICTPATH_KEY, $config->get('dcmdictpath', DICOMEXTRACTOR_DCMDICTPATH_DEFAULT_VALUE), $this->moduleName);
         $config = new Zend_Config_Ini($configPath, null, true);
         unset($config->global->dcm2xml);
         unset($config->global->dcmj2pnm);
         unset($config->global->dcmftest);
         unset($config->global->dcmdictpath);
         $writer = new Zend_Config_Writer_Ini();
         $writer->setConfig($config);
         $writer->setFilename($configPath);
         $writer->write();
     } else {
         $settingModel->setConfig(DICOMEXTRACTOR_DCM2XML_COMMAND_KEY, DICOMEXTRACTOR_DCM2XML_COMMAND_DEFAULT_VALUE, $this->moduleName);
         $settingModel->setConfig(DICOMEXTRACTOR_DCMJ2PNM_COMMAND_KEY, DICOMEXTRACTOR_DCMJ2PNM_COMMAND_DEFAULT_VALUE, $this->moduleName);
         $settingModel->setConfig(DICOMEXTRACTOR_DCMFTEST_COMMAND_KEY, DICOMEXTRACTOR_DCMFTEST_COMMAND_DEFAULT_VALUE, $this->moduleName);
         $settingModel->setConfig(DICOMEXTRACTOR_DCMDICTPATH_KEY, DICOMEXTRACTOR_DCMDICTPATH_DEFAULT_VALUE, $this->moduleName);
     }
 }
开发者ID:josephsnyder,项目名称:Midas,代码行数:28,代码来源:1.1.0.php


示例5: postUpgrade

 /** Post database upgrade. */
 public function postUpgrade()
 {
     /** @var RandomComponent $randomComponent */
     $randomComponent = MidasLoader::loadComponent('Random');
     $securityKey = $randomComponent->generateString(32);
     /** @var SettingModel $settingModel */
     $settingModel = MidasLoader::loadModel('Setting');
     $configPath = LOCAL_CONFIGS_PATH . DIRECTORY_SEPARATOR . $this->moduleName . '.local.ini';
     if (file_exists($configPath)) {
         $config = new Zend_Config_Ini($configPath, 'global');
         $settingModel->setConfig(MIDAS_REMOTEPROCESSING_SECURITY_KEY_KEY, $config->get('securitykey', $securityKey), $this->moduleName);
         $showButton = $config->get('showbutton');
         if ($showButton === 'true') {
             $showButton = 1;
         } elseif ($showButton === 'false') {
             $showButton = 0;
         } else {
             $showButton = MIDAS_REMOTEPROCESSING_SHOW_BUTTON_DEFAULT_VALUE;
         }
         $settingModel->setConfig(MIDAS_REMOTEPROCESSING_SHOW_BUTTON_KEY, $showButton, $this->moduleName);
         $config = new Zend_Config_Ini($configPath, null, true);
         unset($config->securitykey->securitykey);
         unset($config->showbutton->showbutton);
         $writer = new Zend_Config_Writer_Ini();
         $writer->setConfig($config);
         $writer->setFilename($configPath);
         $writer->write();
     } else {
         $settingModel->setConfig(MIDAS_REMOTEPROCESSING_SECURITY_KEY_KEY, $securityKey, $this->moduleName);
         $settingModel->setConfig(MIDAS_REMOTEPROCESSING_SHOW_BUTTON_KEY, MIDAS_REMOTEPROCESSING_SHOW_BUTTON_DEFAULT_VALUE, $this->moduleName);
     }
 }
开发者ID:josephsnyder,项目名称:Midas,代码行数:33,代码来源:1.1.0.php


示例6: init_plugins

/**
 * Initialize plugins hook system
 */
function init_plugins()
{
    include APPPATH . 'config/cache.php';
    $feEngine = $config['plugins_frontend_engine'];
    $feOptions = $config['plugins_frontend'];
    $beEngine = $config['plugins_backend_engine'];
    $beOptions = $config['plugins_backend'];
    if (isset($beOptions['cache_dir']) && !file_exists($beOptions['cache_dir'])) {
        mkdir($beOptions['cache_dir']);
        chmod($beOptions['cache_dir'], 0777);
    }
    $cache = Zend_Cache::factory($feEngine, $beEngine, $feOptions, $beOptions);
    $pluginsConfigArray = $cache->load('pluginsConfig');
    if (!$pluginsConfigArray) {
        $pluginsConfigArray = array();
        $pluginConfDirHandler = opendir(APPPATH . 'config/plugins');
        while (false !== ($pluginConfigFile = readdir($pluginConfDirHandler))) {
            if (preg_match('~^.*?\\.ini$~si', $pluginConfigFile)) {
                try {
                    $pluginConfig = new Zend_Config_Ini(APPPATH . 'config/plugins/' . $pluginConfigFile, 'plugins');
                    $pluginsConfigArray = array_merge_recursive($pluginsConfigArray, $pluginConfig->toArray());
                } catch (Exception $e) {
                }
            }
        }
        closedir($pluginConfDirHandler);
        $cache->save($pluginsConfigArray, 'pluginsConfig');
    }
    Zend_Registry::getInstance()->set('pluginsConfig', new Zend_Config($pluginsConfigArray));
}
开发者ID:sabril-2t,项目名称:Open-Ad-Server,代码行数:33,代码来源:init_plugins.php


示例7: loadErrors

 protected static function loadErrors()
 {
     if (!is_array(self::$errors)) {
         $config = new \Zend_Config_Ini(APPLICATION_PATH . '/configs/errors.ini');
         self::$errors = $config->get('errors')->toArray();
     }
 }
开发者ID:rukzuk,项目名称:rukzuk,代码行数:7,代码来源:Error.php


示例8: postUpgrade

 /** Post database upgrade. */
 public function postUpgrade()
 {
     /** @var SettingModel $settingModel */
     $settingModel = MidasLoader::loadModel('Setting');
     $configPath = LOCAL_CONFIGS_PATH . DIRECTORY_SEPARATOR . $this->moduleName . '.local.ini';
     if (file_exists($configPath)) {
         $config = new Zend_Config_Ini($configPath, 'global');
         $settingModel->setConfig(MIDAS_THUMBNAILCREATOR_PROVIDER_KEY, MIDAS_THUMBNAILCREATOR_PROVIDER_PHMAGICK, $this->moduleName);
         $settingModel->setConfig(MIDAS_THUMBNAILCREATOR_FORMAT_KEY, MIDAS_THUMBNAILCREATOR_FORMAT_JPG, $this->moduleName);
         $settingModel->setConfig(MIDAS_THUMBNAILCREATOR_IMAGE_MAGICK_KEY, $config->get('imagemagick', MIDAS_THUMBNAILCREATOR_IMAGE_MAGICK_DEFAULT_VALUE), $this->moduleName);
         $settingModel->setConfig(MIDAS_THUMBNAILCREATOR_USE_THUMBNAILER_KEY, $config->get('useThumbnailer', MIDAS_THUMBNAILCREATOR_USE_THUMBNAILER_DEFAULT_VALUE), $this->moduleName);
         $settingModel->setConfig(MIDAS_THUMBNAILCREATOR_THUMBNAILER_KEY, $config->get('thumbnailer', MIDAS_THUMBNAILCREATOR_THUMBNAILER_DEFAULT_VALUE), $this->moduleName);
         $config = new Zend_Config_Ini($configPath, null, true);
         unset($config->global->imageFormats);
         unset($config->global->imagemagick);
         unset($config->global->thumbnailer);
         unset($config->global->useThumbnailer);
         $writer = new Zend_Config_Writer_Ini();
         $writer->setConfig($config);
         $writer->setFilename($configPath);
         $writer->write();
     } else {
         $settingModel->setConfig(MIDAS_THUMBNAILCREATOR_PROVIDER_KEY, MIDAS_THUMBNAILCREATOR_PROVIDER_DEFAULT_VALUE, $this->moduleName);
         $settingModel->setConfig(MIDAS_THUMBNAILCREATOR_FORMAT_KEY, MIDAS_THUMBNAILCREATOR_FORMAT_DEFAULT_VALUE, $this->moduleName);
         $settingModel->setConfig(MIDAS_THUMBNAILCREATOR_IMAGE_MAGICK_KEY, MIDAS_THUMBNAILCREATOR_IMAGE_MAGICK_DEFAULT_VALUE, $this->moduleName);
         $settingModel->setConfig(MIDAS_THUMBNAILCREATOR_USE_THUMBNAILER_KEY, MIDAS_THUMBNAILCREATOR_USE_THUMBNAILER_DEFAULT_VALUE, $this->moduleName);
         $settingModel->setConfig(MIDAS_THUMBNAILCREATOR_THUMBNAILER_KEY, MIDAS_THUMBNAILCREATOR_THUMBNAILER_DEFAULT_VALUE, $this->moduleName);
     }
 }
开发者ID:josephsnyder,项目名称:Midas,代码行数:30,代码来源:1.1.0.php


示例9: _initSession

 protected function _initSession()
 {
     $configSession = new Zend_Config_Ini(APPLICATION_PATH . '/configs/session.ini', APPLICATION_ENV);
     if (!$this->_request->isInstalling()) {
         $config = array('name' => 'session', 'primary' => 'session_id', 'modifiedColumn' => 'modified', 'dataColumn' => 'data', 'lifetimeColumn' => 'lifetime', 'lifetime' => $configSession->gc_maxlifetime);
         Zend_Session::setSaveHandler(new Zend_Session_SaveHandler_DbTable($config));
     }
     if (!$this->_request->isInstalling() or is_writable(Core_Model_Directory::getSessionDirectory(true))) {
         $types = array();
         $options = $configSession->toArray();
         if (isset($options['types'])) {
             $types = $options['types'];
             unset($options['types']);
         }
         Zend_Session::start($options);
         $session_type = $this->_request->isApplication() ? 'mobile' : 'front';
         $session = new Core_Model_Session($session_type);
         foreach ($types as $type => $class) {
             $session->addType($type, $class);
         }
         $language_session = new Core_Model_Session('language');
         if (!$language_session->current_language) {
             $language_session->current_language = null;
         }
         Core_Model_Language::setSession($language_session);
         Core_View_Default::setSession($session);
         Core_Controller_Default::setSession($session);
     }
 }
开发者ID:BeamlabsTigre,项目名称:Webapp,代码行数:29,代码来源:Bootstrap.php


示例10: postUpgrade

 /** Post database upgrade. */
 public function postUpgrade()
 {
     /** @var SettingModel $settingModel */
     $settingModel = MidasLoader::loadModel('Setting');
     $configPath = LOCAL_CONFIGS_PATH . DIRECTORY_SEPARATOR . $this->moduleName . '.local.ini';
     if (file_exists($configPath)) {
         $config = new Zend_Config_Ini($configPath, 'global');
         $piwikUrl = isset($config->piwik->url) ? $config->piwik->url : STATISTICS_PIWIK_URL_DEFAULT_VALUE;
         $settingModel->setConfig(STATISTICS_PIWIK_URL_KEY, $piwikUrl, $this->moduleName);
         $piwikId = isset($config->piwik->id) ? $config->piwik->id : STATISTICS_PIWIK_SITE_ID_DEFAULT_VALUE;
         $settingModel->setConfig(STATISTICS_PIWIK_SITE_ID_KEY, $piwikId, $this->moduleName);
         $piwikApiKey = isset($config->piwik->apikey) ? $config->piwik->apikey : STATISTICS_PIWIK_API_KEY_DEFAULT_VALUE;
         $settingModel->setConfig(STATISTICS_PIWIK_API_KEY_KEY, $piwikApiKey, $this->moduleName);
         $ipInfoDbApiKey = isset($config->ipinfodb->apikey) ? $config->ipinfodb->apikey : STATISTICS_IP_INFO_DB_API_KEY_DEFAULT_VALUE;
         $settingModel->setConfig(STATISTICS_IP_INFO_DB_API_KEY_KEY, $ipInfoDbApiKey, $this->moduleName);
         $settingModel->setConfig(STATISTICS_SEND_DAILY_REPORTS_KEY, $config->get('report', STATISTICS_SEND_DAILY_REPORTS_DEFAULT_VALUE), $this->moduleName);
         $config = new Zend_Config_Ini($configPath, null, true);
         unset($config->global->piwik->url);
         unset($config->global->piwik->id);
         unset($config->global->piwik->pikey);
         unset($config->global->ipinfodb->apikey);
         unset($config->global->report);
         $writer = new Zend_Config_Writer_Ini();
         $writer->setConfig($config);
         $writer->setFilename($configPath);
         $writer->write();
     } else {
         $settingModel->setConfig(STATISTICS_PIWIK_URL_KEY, STATISTICS_PIWIK_URL_DEFAULT_VALUE, $this->moduleName);
         $settingModel->setConfig(STATISTICS_PIWIK_SITE_ID_KEY, STATISTICS_PIWIK_SITE_ID_DEFAULT_VALUE, $this->moduleName);
         $settingModel->setConfig(STATISTICS_PIWIK_API_KEY_KEY, STATISTICS_PIWIK_API_KEY_DEFAULT_VALUE, $this->moduleName);
         $settingModel->setConfig(STATISTICS_IP_INFO_DB_API_KEY_KEY, STATISTICS_IP_INFO_DB_API_KEY_DEFAULT_VALUE, $this->moduleName);
         $settingModel->setConfig(STATISTICS_SEND_DAILY_REPORTS_KEY, STATISTICS_SEND_DAILY_REPORTS_DEFAULT_VALUE, $this->moduleName);
     }
 }
开发者ID:josephsnyder,项目名称:Midas,代码行数:35,代码来源:1.1.0.php


示例11: getApplication

 /**
  * 
  * @return Zend_Application
  */
 public static function getApplication()
 {
     $application = new Zend_Application(APPLICATION_ENV);
     $applicationini = new Zend_Config_Ini(APPLICATION_PATH . "/configs/application.ini", APPLICATION_ENV);
     $options = $applicationini->toArray();
     foreach (self::$_ini as $value) {
         $iniFile = APPLICATION_PATH . self::$_pathConfig . $value;
         if (is_readable($iniFile)) {
             $config = new Zend_Config_Ini($iniFile);
             $options = $application->mergeOptions($options, $config->toArray());
         } else {
             throw new Zend_Exception('error en la configuracion de los .ini');
         }
     }
     //        foreach (self::$_ini as $value) {
     //            $iniFile = APPLICATION_PATH . self::$_pathConfig . $value;
     //
     //            if (is_readable($iniFile)) {
     //                $config = new Zend_Config_Ini($iniFile);
     //                $options = $application->mergeOptions($options,
     //                    $config->toArray());
     //            } else {
     //            throw new Zend_Exception('error en la configuracion de los .ini');
     //            }
     //        }
     Zend_Registry::set('config', $options);
     $a = $application->setOptions($options);
     return $application;
 }
开发者ID:josmel,项目名称:HosPot,代码行数:33,代码来源:index.php


示例12: _initSession

 protected function _initSession()
 {
     $config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/sessions.ini', 'development');
     Zend_Session::setOptions($config->toArray());
     // start session
     Zend_Session::start();
 }
开发者ID:richistron,项目名称:Ofelia,代码行数:7,代码来源:Bootstrap.php


示例13: postUpgrade

 /** Post database upgrade. */
 public function postUpgrade()
 {
     /** @var SettingModel $settingModel */
     $settingModel = MidasLoader::loadModel('Setting');
     $config = new Zend_Config_Ini(APPLICATION_CONFIG, 'global');
     $settingModel->setConfig('address_verification', $config->get('verifyemail', 0), 'mail');
     if ($config->get('smtpfromaddress')) {
         $fromAddress = $config->get('smtpfromaddress');
     } elseif (ini_get('sendmail_from')) {
         $fromAddress = ini_get('sendmail_from');
     } else {
         $fromAddress = '[email protected]';
         // RFC2606
     }
     $settingModel->setConfig('from_address', $fromAddress, 'mail');
     if ($config->get('smtpserver')) {
         $components = parse_url($config->get('smtpserver'));
         if (isset($components['host'])) {
             $settingModel->setConfig('smtp_host', $components['host'], 'mail');
         }
         if (isset($components['port'])) {
             $settingModel->setConfig('smtp_port', $components['port'], 'mail');
             if ($components['port'] === 587) {
                 $settingModel->setConfig('smtp_use_ssl', 1, 'mail');
             }
         }
         if (isset($components['user'])) {
             $settingModel->setConfig('smtp_username', $components['user'], 'mail');
         }
         if (isset($components['pass'])) {
             $settingModel->setConfig('smtp_password', $components['pass'], 'mail');
         }
     }
     if ($config->get('smtpuser')) {
         $settingModel->setConfig('smtp_username', $config->get('smtpuser'), 'mail');
     }
     if ($config->get('smtppassword')) {
         $settingModel->setConfig('smtp_password', $config->get('smtppassword'), 'mail');
     }
     if ($settingModel->getValueByName('smtp_host', 'mail')) {
         $provider = 'smtp';
     } else {
         $provider = 'mail';
     }
     $settingModel->setConfig('provider', $provider, 'mail');
     /** @var UtilityComponent $utilityComponent */
     $utilityComponent = MidasLoader::loadComponent('Utility');
     $utilityComponent->installModule('mail');
     $config = new Zend_Config_Ini(APPLICATION_CONFIG, null, true);
     unset($config->global->smtpfromaddress);
     unset($config->global->smtpserver);
     unset($config->global->smtpuser);
     unset($config->global->smtppassword);
     unset($config->global->verifyemail);
     $writer = new Zend_Config_Writer_Ini();
     $writer->setConfig($config);
     $writer->setFilename(APPLICATION_CONFIG);
     $writer->write();
 }
开发者ID:josephsnyder,项目名称:Midas,代码行数:60,代码来源:3.2.17.php


示例14: setUp

 public function setUp()
 {
     parent::setUp();
     $config = new Zend_Config_Ini(dirname(__FILE__) . "/KAsyncCaptureThumbTest.ini");
     $testConfig = $config->get('config');
     $this->outputFolder = dirname(__FILE__) . '/' . $testConfig->outputFolder;
     $this->testsConfig = $config->get('tests');
 }
开发者ID:DBezemer,项目名称:server,代码行数:8,代码来源:KAsyncCaptureThumbTest.php


示例15: getRecipients

 private static function getRecipients($docid, $rec_num = -1)
 {
     $db = Zend_Db_Table_Abstract::getDefaultAdapter();
     $sql = "select AV.VAL\r\nfrom V_ADD_VALUES AV\r\nwhere AV.NODEID = ?\r\nand AV.FIELDNAME = '_ADD_RECIPIENTS'";
     $rec = $db->fetchOne($sql, $docid);
     $rec = new Zend_Config_Ini('data://,' . $rec);
     return $rec->toArray();
 }
开发者ID:TDMU,项目名称:contingent5_statserver,代码行数:8,代码来源:Mail.php


示例16: getConfig

 /**
  *
  * @return Zend_Config_Ini
  */
 public function getConfig()
 {
     $this->config = new Zend_Config_Ini(array_shift($this->configFiles), $this->section, true);
     foreach ($this->configFiles as $file) {
         $this->config->merge(new Zend_Config_Ini($file, $this->section, true));
     }
     return $this->config;
 }
开发者ID:Cryde,项目名称:sydney-core,代码行数:12,代码来源:IniConfig.php


示例17: _loadConfig

 /**
  * Load configuration file of options
  *
  * @param  string $file
  * @return array
  */
 protected function _loadConfig($file, $environment)
 {
     $configCommon = new Zend_Config_Ini($file, $environment, true);
     $configCustom = new Zend_Config_Ini(str_replace('.common.ini', '.ini', $file), $environment);
     $configCommon->merge($configCustom);
     $configCommon->path->root = getcwd();
     $config = new System_Config_Placeholder($configCommon);
     return $config->toArray();
 }
开发者ID:kandy,项目名称:HamsterCMF,代码行数:15,代码来源:ConfigAdapterTask.php


示例18: _initConfig

 protected function _initConfig()
 {
     $config = new Zend_Config($this->getOptions(), true);
     Zend_Registry::set('config', $config);
     // TODO faut-il utiliser les sessions ou les registres ?
     $configSession = new Zend_Config_Ini(__DIR__ . '/configs/session.ini', APPLICATION_ENV);
     Zend_Session::setOptions($configSession->toArray());
     return $config;
 }
开发者ID:r1zib,项目名称:salesforce,代码行数:9,代码来源:Bootstrap.php


示例19: _initLocalConfigs

 /**
  * Save all values from config to ZendRegistry
  */
 protected function _initLocalConfigs()
 {
     $allconfig = new Zend_Config_Ini(APPLICATION_PATH . '/configs/config.ini');
     $envconfig = $allconfig->toArray();
     $registry = new Zend_Registry($envconfig[APPLICATION_ENV], ArrayObject::ARRAY_AS_PROPS);
     foreach ($registry as $key => $value) {
         Zend_Registry::set($key, $value);
     }
 }
开发者ID:zelimirus,项目名称:yard,代码行数:12,代码来源:Bootstrap.php


示例20: addNewsAction

 public function addNewsAction()
 {
     $options = $this->getInvokeArg('bootstrap')->getOptions();
     $configDir = $options['path']['configs'];
     $config = new Zend_Config_Ini($configDir . '/agregator.ini', 'korespondent');
     $data = $config->toArray();
     $news = new Spider_News($data);
     $news->setLogger($this->getLog());
     $news->process();
 }
开发者ID:kandy,项目名称:HamsterCMF,代码行数:10,代码来源:IndexController.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Zend_Config_Writer_Ini类代码示例发布时间:2022-05-23
下一篇:
PHP Zend_Config类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap