2017 © Pedro Peláez
 

library yaml-file-config

Yaml file configuration handler

image

dragooon/yaml-file-config

Yaml file configuration handler

  • Wednesday, December 30, 2015
  • by Dragooon
  • Repository
  • 1 Watchers
  • 5 Stars
  • 29 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Yaml File Configuration

Simple library for loading and accessing configuration stored in .yml files. It relies on symfony/yaml for its functions. The library avoids loading Yaml file until requested (lazy loading) to avoid unnecessary loading and parsing., (*1)

Installation

You can install the project via composer, (*2)

composer require dragooon/yaml-file-config, (*3)

Usage

config.yml

timeout: 10
parameter:
  a: 1
  b: 2
name: abc

app.php

$config = new \Dragooon\YamlFileConfig\YamlFileConfig('config.yml');
echo $config['timeout']; // 10
echo $config['parameter']['a']; // 1;
echo $config->get('name'); // abc

// You can also modify the configuration by either of the following
$config['timeout'] = 20;
$config->set('parameter', [
    'a' => 2,
    'b' => 3,
]);

// And finally save the file to write into config.yml
$config->save();

License

The project is licensed under The MIT License. See LICENSE for more information., (*4)

The Versions

30/12 2015

dev-master

9999999-dev

Yaml file configuration handler

  Sources   Download

MIT

The Requires

 

30/12 2015

0.1.0

0.1.0.0

Yaml file configuration handler

  Sources   Download

MIT

The Requires