ultra-lite / config-reader
1.0.0
2017-02-14 01:03 UTC
Requires
- php: >=7.0.0
Requires (Dev)
- phpunit/phpunit: ^6.0
This package is not auto-updated.
Last update: 2024-10-26 19:26:54 UTC
README
Ultra-Lite Config Reader
An ultra-lightweight config file parser.
Usage
$configReader = new \UltraLite\ConfigReader\ConfigReader; $array = $configReader->getConfigArray('/path/to/file.json');
Error Handling
If there is a problem, it (only) throws an \UltraLite\ConfigReader\Exception\ConfigReaderException
of some kind.
Supported File Types
.json
, .ini
and .php
'return array' files are supported.
To be part of the UltraLite project, it is quite lightweight, but it can be extended to support other file types. Just
come up with your own implementation of \UltraLite\ConfigReader\FileParser
:
$customFileParser = new MyXmlFileParser(); $configReader->addFileParser($customFileParser); $array = $configReader->getConfigArray('/path/to/file.xml');