aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/config/ConfigPhp.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/config/ConfigPhp.php')
-rw-r--r--application/config/ConfigPhp.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/application/config/ConfigPhp.php b/application/config/ConfigPhp.php
index 27187b66..d7fd4baf 100644
--- a/application/config/ConfigPhp.php
+++ b/application/config/ConfigPhp.php
@@ -41,6 +41,7 @@ class ConfigPhp implements ConfigIO
41 'resource.log' => 'config.LOG_FILE', 41 'resource.log' => 'config.LOG_FILE',
42 'resource.update_check' => 'config.UPDATECHECK_FILENAME', 42 'resource.update_check' => 'config.UPDATECHECK_FILENAME',
43 'resource.raintpl_tpl' => 'config.RAINTPL_TPL', 43 'resource.raintpl_tpl' => 'config.RAINTPL_TPL',
44 'resource.theme' => 'config.theme',
44 'resource.raintpl_tmp' => 'config.RAINTPL_TMP', 45 'resource.raintpl_tmp' => 'config.RAINTPL_TMP',
45 'resource.thumbnails_cache' => 'config.CACHEDIR', 46 'resource.thumbnails_cache' => 'config.CACHEDIR',
46 'resource.page_cache' => 'config.PAGECACHE', 47 'resource.page_cache' => 'config.PAGECACHE',
@@ -71,7 +72,7 @@ class ConfigPhp implements ConfigIO
71 /** 72 /**
72 * @inheritdoc 73 * @inheritdoc
73 */ 74 */
74 function read($filepath) 75 public function read($filepath)
75 { 76 {
76 if (! file_exists($filepath) || ! is_readable($filepath)) { 77 if (! file_exists($filepath) || ! is_readable($filepath)) {
77 return array(); 78 return array();
@@ -91,7 +92,7 @@ class ConfigPhp implements ConfigIO
91 /** 92 /**
92 * @inheritdoc 93 * @inheritdoc
93 */ 94 */
94 function write($filepath, $conf) 95 public function write($filepath, $conf)
95 { 96 {
96 $configStr = '<?php '. PHP_EOL; 97 $configStr = '<?php '. PHP_EOL;
97 foreach (self::$ROOT_KEYS as $key) { 98 foreach (self::$ROOT_KEYS as $key) {
@@ -99,7 +100,7 @@ class ConfigPhp implements ConfigIO
99 $configStr .= '$GLOBALS[\'' . $key . '\'] = ' . var_export($conf[$key], true) . ';' . PHP_EOL; 100 $configStr .= '$GLOBALS[\'' . $key . '\'] = ' . var_export($conf[$key], true) . ';' . PHP_EOL;
100 } 101 }
101 } 102 }
102 103
103 // Store all $conf['config'] 104 // Store all $conf['config']
104 foreach ($conf['config'] as $key => $value) { 105 foreach ($conf['config'] as $key => $value) {
105 $configStr .= '$GLOBALS[\'config\'][\''. $key .'\'] = '.var_export($conf['config'][$key], true).';'. PHP_EOL; 106 $configStr .= '$GLOBALS[\'config\'][\''. $key .'\'] = '.var_export($conf['config'][$key], true).';'. PHP_EOL;
@@ -125,7 +126,7 @@ class ConfigPhp implements ConfigIO
125 /** 126 /**
126 * @inheritdoc 127 * @inheritdoc
127 */ 128 */
128 function getExtension() 129 public function getExtension()
129 { 130 {
130 return '.php'; 131 return '.php';
131 } 132 }