Skip to content
This repository has been archived by the owner on Mar 2, 2023. It is now read-only.

KEIII/YamlConfig

Repository files navigation

Build Status

Utilize symfony components (The Config Component and The Yaml Component) to provide symfony like configuration for any application.

Installation

composer require keiii/yaml-config

Config example

# /parameters.yml
parameters:
    db_username: 'root'
    db_password: 'secret'
# /config/config.env.yml
imports:
    - { resource: '../parameters.yml' }

database:
    username: '%db_username%'
    password: '%db_password%'

Usage

<?php

$loader = \KEIII\YamlConfig\Factory::create(
    __DIR__.'/config', // configs path
    ['key' => 'value'], // replacements
    __DIR__.'/var/cache' // cache path or false
);

$config = $loader->load('config.env.yml'); // array

About

Utilize symfony components (The Config Component, The Yaml Component) to provide symfony like configuration for any application.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published