2017 © Pedro Peláez
 

library php-config-yaml

A yaml configuration reader

image

nvanheuverzwijn/php-config-yaml

A yaml configuration reader

  • Friday, January 26, 2018
  • by nvanheuverzwijn
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

php-config-yaml

A yaml configuration parser. This is part of a larger configuration library found here., (*1)

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., (*2)

Directly using this reader like this., (*3)

$reader = new Yaml\Reader([
    'file' => '/some/file.yml',
    'yaml_parser' => '\Symfony\Component\Yaml\Yaml::parse'
]);
$array = $reader->fetchAll();

Use this reader with \Zwijn\Config., (*4)

$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, (*5)

Test

make test, (*6)

The Versions

26/01 2018

dev-master

9999999-dev http://github.com/nvanheuverzwijn/php-config-yml

A yaml configuration reader

  Sources   Download

LGPL3.0 LGPL-3.0-or-later

The Requires

 

The Development Requires

by Nicolas Vanheuverzwijn

configuration config yaml yml

19/06 2017

0.0.1

0.0.1.0 http://github.com/nvanheuverzwijn/php-config-yml

A yaml configuration reader

  Sources   Download

LGPL3.0

The Requires

 

The Development Requires

by Nicolas Vanheuverzwijn

configuration config yaml yml