nvanheuverzwijn / php-config-yaml
This package is abandoned and no longer maintained.
No replacement package was suggested.
A yaml configuration reader
0.0.1
2017-06-19 04:20 UTC
Requires
- php: >=5.6.0
- nvanheuverzwijn/php-config: >=0.0.1
Requires (Dev)
- phpunit/phpunit: ^5.7
This package is not auto-updated.
Last update: 2024-02-04 00:15:59 UTC
README
A yaml configuration parser. This is part of a larger configuration library found here.
Usage
This yaml reader accept a configuration array as an argument. It supports two key: file
to specify a yml file to read and yaml_parser
to specify a callable function that parse yaml.
Directly using this reader like this.
$reader = new Yaml\Reader([
'file' => '/some/file.yml',
'yaml_parser' => '\Symfony\Component\Yaml\Yaml::parse'
]);
$array = $reader->fetchAll();
Use this reader with \Zwijn\Config
.
$conf = \Zwijn\Config\ConfigFactory::fromArray([
'reader' => [
[
'class' => '\Zwijn\Config\Yaml\Reader'
'config' => [
'file' => '/some/file.yml',
'yaml_parser' => '\Symfony\Component\Yaml\Yaml::parse'
]
]
]
]);
Dependency
make composer
Test
make test