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


PHP Config::getGlobalConfigPath方法代码示例

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


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

示例1: setTestEnvironment

 /**
  * Enable test environment
  *
  * @param string $pathLocal
  * @param string $pathGlobal
  * @param string $pathCommon
  */
 public function setTestEnvironment($pathLocal = null, $pathGlobal = null, $pathCommon = null, $allowSaving = false)
 {
     if (!$allowSaving) {
         $this->isTest = true;
     }
     $this->clear();
     $this->pathLocal = $pathLocal ?: Config::getLocalConfigPath();
     $this->pathGlobal = $pathGlobal ?: Config::getGlobalConfigPath();
     $this->pathCommon = $pathCommon ?: Config::getCommonConfigPath();
     $this->init();
     // this proxy will not record any data in the production database.
     // this provides security for Piwik installs and tests were setup.
     if (isset($this->configGlobal['database_tests']) || isset($this->configLocal['database_tests'])) {
         $this->__get('database_tests');
         $this->configCache['database'] = $this->configCache['database_tests'];
     }
     // Ensure local mods do not affect tests
     if (empty($pathGlobal)) {
         $this->configCache['log'] = $this->configGlobal['log'];
         $this->configCache['Debug'] = $this->configGlobal['Debug'];
         $this->configCache['mail'] = $this->configGlobal['mail'];
         $this->configCache['General'] = $this->configGlobal['General'];
         $this->configCache['Segments'] = $this->configGlobal['Segments'];
         $this->configCache['Tracker'] = $this->configGlobal['Tracker'];
         $this->configCache['Deletelogs'] = $this->configGlobal['Deletelogs'];
         $this->configCache['Deletereports'] = $this->configGlobal['Deletereports'];
         $this->configCache['Development'] = $this->configGlobal['Development'];
     }
     // for unit tests, we set that no plugin is installed. This will force
     // the test initialization to create the plugins tables, execute ALTER queries, etc.
     $this->configCache['PluginsInstalled'] = array('PluginsInstalled' => array());
 }
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:39,代码来源:Config.php

示例2: setTestEnvironment

 /**
  * Enable test environment
  *
  * @param string $pathLocal
  * @param string $pathGlobal
  * @param string $pathCommon
  */
 public function setTestEnvironment($pathLocal = null, $pathGlobal = null, $pathCommon = null, $allowSaving = false)
 {
     if (!$allowSaving) {
         $this->doNotWriteConfigInTests = true;
     }
     $this->pathLocal = $pathLocal ?: Config::getLocalConfigPath();
     $this->pathGlobal = $pathGlobal ?: Config::getGlobalConfigPath();
     $this->pathCommon = $pathCommon ?: Config::getCommonConfigPath();
     $this->reload();
     $databaseTestsSettings = $this->database_tests;
     if (!empty($databaseTestsSettings)) {
         $this->database = $databaseTestsSettings;
     }
     // Ensure local mods do not affect tests
     if (empty($pathGlobal)) {
         $this->Debug = $this->settings->getFrom($this->pathGlobal, 'Debug');
         $this->mail = $this->settings->getFrom($this->pathGlobal, 'mail');
         $this->General = $this->settings->getFrom($this->pathGlobal, 'General');
         $this->Segments = $this->settings->getFrom($this->pathGlobal, 'Segments');
         $this->Tracker = $this->settings->getFrom($this->pathGlobal, 'Tracker');
         $this->Deletelogs = $this->settings->getFrom($this->pathGlobal, 'Deletelogs');
         $this->Deletereports = $this->settings->getFrom($this->pathGlobal, 'Deletereports');
         $this->Development = $this->settings->getFrom($this->pathGlobal, 'Development');
     }
     // for unit tests, we set that no plugin is installed. This will force
     // the test initialization to create the plugins tables, execute ALTER queries, etc.
     $this->PluginsInstalled = array('PluginsInstalled' => array());
 }
开发者ID:bossrabbit,项目名称:piwik,代码行数:35,代码来源:Config.php


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