Download the PHP package requtize/config without Composer
On this page you can find all versions of the php package requtize/config. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download requtize/config
More information about requtize/config
Files in requtize/config
Package config
Short Description Simple Config library, that handle PHP arrays, YAML and INI files as configs and can dump all configs into one PHP file as Cache.
License MIT
Homepage https://github.com/requtize/config
Informations about the package config
Config
This library provides configurational files system, that alows You to combine multiple files and multiple formats into one object and accessing to it from simple array DOT notation.
- Merging multiple files into one object
- Imports files in multiple formats in the same way: PHP, INI, YAML
- Import files from another files
- Simple dot notation for accessing arrays
- Cache system, for save parsed files into one
Installation
Via composer.json
Via Composer CLI
Dot notation
Dot notation is created for accessing multidimentional arrays (PHP) in simple way. If we want to access to some value, we need separate each index by dot. Following code should to explain that:
Code
Importing other files in config file
If you want to import other files, You musn't write any PHP to do this. Just use imports.files index in any file, and type files names in each index You want to import. Importing can be used for imports other formats in the same way. Remember that the files are searched relative to file you place importing rules!
@todo
- Prefixes for imported files to allow import files from different place: '%root%/config.file.php', '%server-config%/some.file.ini'
- XML files support
- You want some more...?
Licence
This code is licensed under MIT License.