aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/config/ConfigPhp.php
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2017-03-03 23:06:12 +0100
committerVirtualTam <virtualtam@flibidi.net>2017-03-04 17:07:52 +0100
commit3c66e56435359dc678048193e8ee239d06f79b64 (patch)
tree38a4be4a9d9babc193683feec412ac008ca9a169 /application/config/ConfigPhp.php
parent74198dcdf65ee3dd83cbe5b6a8a85bc386a62063 (diff)
downloadShaarli-3c66e56435359dc678048193e8ee239d06f79b64.tar.gz
Shaarli-3c66e56435359dc678048193e8ee239d06f79b64.tar.zst
Shaarli-3c66e56435359dc678048193e8ee239d06f79b64.zip
application: introduce the Shaarli\Config namespace
Namespaces have been introduced with the REST API, and should be generalized to the whole codebase to manage object scope and benefit from autoloading. See: - https://secure.php.net/manual/en/language.namespaces.php - http://www.php-fig.org/psr/psr-4/ Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'application/config/ConfigPhp.php')
-rw-r--r--application/config/ConfigPhp.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/application/config/ConfigPhp.php b/application/config/ConfigPhp.php
index d7fd4baf..2633824d 100644
--- a/application/config/ConfigPhp.php
+++ b/application/config/ConfigPhp.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2namespace Shaarli\Config;
2 3
3/** 4/**
4 * Class ConfigPhp (ConfigIO implementation) 5 * Class ConfigPhp (ConfigIO implementation)
@@ -115,7 +116,7 @@ class ConfigPhp implements ConfigIO
115 if (!file_put_contents($filepath, $configStr) 116 if (!file_put_contents($filepath, $configStr)
116 || strcmp(file_get_contents($filepath), $configStr) != 0 117 || strcmp(file_get_contents($filepath), $configStr) != 0
117 ) { 118 ) {
118 throw new IOException( 119 throw new \IOException(
119 $filepath, 120 $filepath,
120 'Shaarli could not create the config file. 121 'Shaarli could not create the config file.
121 Please make sure Shaarli has the right to write in the folder is it installed in.' 122 Please make sure Shaarli has the right to write in the folder is it installed in.'