Commit graph

17 commits

Author SHA1 Message Date
VirtualTam
dea72c711f Optimize and cleanup imports
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2019-01-13 00:04:42 +01:00
VirtualTam
f3d2f25794 namespacing: \Shaarli\Exceptions\IOException
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2019-01-12 22:47:48 +01:00
ArthurHoaro
a3724717ec ConfigManager: add a method to remove an entry 2018-07-05 20:31:35 +02:00
ArthurHoaro
cb4ddbe4e7 Fix warnings when upgrading from legacy SebSauvage version
Fixes #1040
2018-01-25 19:55:31 +01:00
ArthurHoaro
c6a4c2882d Proper error if the conf file is invalid instead of fatal error
Error:

An error occurred while parsing configuration JSON file (data/config.json.php): error code #4
➜ Syntax error
Please check your JSON syntax (without PHP comment tags) using a JSON lint tool such as jsonlint.com.
2017-03-12 16:09:34 +01:00
ArthurHoaro
5ba55f0cf2 Move config exception to dedicated classes with proper namespace 2017-03-09 19:16:42 +01:00
ArthurHoaro
e6cd773f5a Fix blocking namespace issue 2017-03-08 20:00:21 +01:00
VirtualTam
3c66e56435 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>
2017-03-04 17:07:52 +01:00
ArthurHoaro
7af9a41881 Minor code cleanup: PHPDoc, spelling, unused variables, etc. 2016-10-20 11:36:11 +02:00
ArthurHoaro
15170b5164 Parse plugin parameters description with the PluginManager
Plugin parameter can contain a description in their meta file under the key:

    parameter.<param_name>="<description>"
2016-08-02 11:12:01 +02:00
ArthurHoaro
5ff23f02b8 Add closing PHP tags to JSON config files 2016-06-20 18:30:37 +02:00
ArthurHoaro
894a3c4bf3 Rename configuration key for better sections 2016-06-11 09:30:56 +02:00
ArthurHoaro
278d9ee283 ConfigManager no longer uses singleton pattern 2016-06-11 09:30:56 +02:00
ArthurHoaro
da10377b3c Rename configuration keys and fix GLOBALS in templates 2016-06-11 09:30:56 +02:00
ArthurHoaro
b74b96bfbd Adds ConfigJson which handle the configuration in JSON format.
Also use the Updater to make the transition
2016-06-11 09:30:56 +02:00
ArthurHoaro
684e662a58 Replace $GLOBALS configuration with the configuration manager in the whole code base 2016-06-11 09:30:56 +02:00
ArthurHoaro
59404d7909 Introduce a configuration manager (not plugged yet) 2016-06-11 09:30:56 +02:00