summaryrefslogtreecommitdiffstats
path: root/app/classes/PlanetConfig.php
diff options
context:
space:
mode:
authornashe <thomas@chauchefoin.fr>2017-10-17 09:42:31 +0200
committernashe <thomas@chauchefoin.fr>2017-10-17 09:42:31 +0200
commit1b341502ba68092b444a7870d601537eec68b344 (patch)
treec99532de86e48fb7646620c2d2a30f5b33a23528 /app/classes/PlanetConfig.php
parentdb2ab071c73feb6ac510bfdc6ee5b9ddad1566ea (diff)
downloadplanet-1b341502ba68092b444a7870d601537eec68b344.tar
planet-1b341502ba68092b444a7870d601537eec68b344.tar.gz
planet-1b341502ba68092b444a7870d601537eec68b344.tar.bz2
planet-1b341502ba68092b444a7870d601537eec68b344.tar.xz
planet-1b341502ba68092b444a7870d601537eec68b344.zip
Cleanup install.php
Diffstat (limited to 'app/classes/PlanetConfig.php')
-rw-r--r--app/classes/PlanetConfig.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/classes/PlanetConfig.php b/app/classes/PlanetConfig.php
index 4348524..f3928bc 100644
--- a/app/classes/PlanetConfig.php
+++ b/app/classes/PlanetConfig.php
@@ -6,9 +6,9 @@
class PlanetConfig
{
- protected $conf = array();
+ protected $conf = [];
- protected $defaultConfig = array(
+ public static $defaultConfig = [
'url' => 'http://www.example.com/',
'name' => '',
'locale' => 'en',
@@ -22,7 +22,7 @@ class PlanetConfig
'cachedir' => './cache',
'debug' => false,
'checkcerts' => true,
- );
+ ];
/**
* PlanetConfig constructor.
@@ -31,7 +31,7 @@ class PlanetConfig
*/
public function __construct($userConfig = [], $useDefaultConfig = true)
{
- $default = $useDefaultConfig ? $this->defaultConfig : array();
+ $default = $useDefaultConfig ? self::$defaultConfig : array();
$this->conf = $this->merge($default, $userConfig);
}
@@ -42,7 +42,7 @@ class PlanetConfig
* @param array $user
* @return array
*/
- protected function merge($default, $user)
+ protected function merge($default = [], $user = [])
{
return array_merge($default, $this->normalizeArrayKeys($user));
}
@@ -131,7 +131,7 @@ class PlanetConfig
*/
public function getDefaultConfig()
{
- return $this->defaultConfig;
+ return self::$defaultConfig;
}
/**