fas/configuration

Fast and simple configuration management

0.2.2 2021-07-09 21:12 UTC

This package is auto-updated.

Last update: 2024-10-10 04:12:40 UTC


README

Build Status Test Coverage

Latest Stable Version Latest Unstable Version License Total Downloads

Installation

composer require fas/configuration

Usage

A simple configuration file library.

database:
    host: mydbhost
<?php

require __DIR__ . '/vendor/autoload.php';

use Fas\Configuration\DotNotation;
use Fas\Configuration\YamlLoader;

$configuration = new DotNotation(YamlLoader::loadWithOverrides('/app/config.yml'));
var_dump($configuration->require('database.host'));

Output:

/app/test.php:9:
string(8) "mydbhost"