Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benakamoorthi@fastmail.fm>2014-03-21 14:05:36 +0400
committerdiosmosis <benakamoorthi@fastmail.fm>2014-03-21 14:14:01 +0400
commit89a6ca2be1808a0bae78fa170ddef39b9c8e835f (patch)
tree90495d02ebfa28f4d2e21b9eb8fd73aea6fa7a89 /core/Config.php
parent73ad601e3e5cdc34ac8b1764e9ba3f5f00b75d67 (diff)
Allow config file paths to be specified in Config constructor.
Diffstat (limited to 'core/Config.php')
-rw-r--r--core/Config.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/core/Config.php b/core/Config.php
index 75fc2b3b3c..dacc5d4014 100644
--- a/core/Config.php
+++ b/core/Config.php
@@ -61,9 +61,11 @@ class Config extends Singleton
/**
* Constructor
*/
- protected function __construct()
+ public function __construct($pathGlobal = null, $pathLocal = null, $pathCommon = null)
{
- $this->clear();
+ $this->pathGlobal = $pathGlobal ?: self::getGlobalConfigPath();
+ $this->pathCommon = $pathCommon ?: self::getCommonConfigPath();
+ $this->pathLocal = $pathLocal ?: self::getLocalConfigPath();
}
/**
@@ -260,10 +262,6 @@ class Config extends Singleton
$this->configLocal = array();
$this->configCache = array();
$this->initialized = false;
-
- $this->pathGlobal = self::getGlobalConfigPath();
- $this->pathCommon = self::getCommonConfigPath();
- $this->pathLocal = self::getLocalConfigPath();
}
/**