An ultra-lightweight config file parser.
$configReader = new \UltraLite\ConfigReader\ConfigReader;
$array = $configReader->getConfigArray('/path/to/file.json');
If there is a problem, it (only) throws an \UltraLite\ConfigReader\Exception\ConfigReaderException
of some kind.
.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');