Download the PHP package jackchang1025-clagiordano/weblibs-configmanager without Composer
On this page you can find all versions of the php package jackchang1025-clagiordano/weblibs-configmanager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jackchang1025-clagiordano/weblibs-configmanager
More information about jackchang1025-clagiordano/weblibs-configmanager
Files in jackchang1025-clagiordano/weblibs-configmanager
Package weblibs-configmanager
Short Description weblibs-configmanager is a tool library for easily read and access to php config array file and direct read/write configuration file / object
License LGPL-3.0-or-later
Informations about the package weblibs-configmanager
weblibs-configmanager
weblibs-configmanager is a tool library for easily read and access to php config array file and direct read/write configuration file / object.
Why use weblibs-configmanager ?
The purpose of this project is to propose a simple and lightweight library to manage php hierarchical configuration files.
Supported formats
This package supports config files in the following format:
Format | Component | Since version | Description |
---|---|---|---|
Array | ConfigManager |
v0.1.0 |
Deprecated, legacy name for the php array reader, only for compatibility support |
Array | ArrayConfigManager |
v1.2.0 |
A file that returns a php array, the original supported format |
Yaml | YamlConfigManager |
v1.3.0 |
A file containing a valid YAML file |
JSON | JsonConfigManager |
v1.4.0 |
A file containing a valid JSON file |
All the supported format are parsed and internally handled in the same way granting the same functionalities.
Installation
The recommended way to install weblibs-configmanager is through Composer.
Usage examples (Array format)
Write a sample config file like this
Instance ConfigManager object
Check if a value exists into config file
Read a simple element from config file
Access to a nested element from config
Change config value at runtime
Save config file with original name (OVERWRITE)
Or save config file with a different name
Optionally you can also reload config file from disk after save
Load another configuration file without reinstance ConfigManager
Legal
Copyright (C) Claudio Giordano [email protected]