https://github.com/linkorb/silex-provider-configloader
https://github.com/linkorb/silex-provider-configloader
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/linkorb/silex-provider-configloader
- Owner: linkorb
- Created: 2017-05-15T19:44:41.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-01T05:45:25.000Z (about 9 years ago)
- Last Synced: 2025-07-13T18:07:43.421Z (12 months ago)
- Language: PHP
- Size: 4.88 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# linkorb/silex-provider-configloader
Services providing loading of configuration files.
Two services are provided and registered with a Pimple container:-
- `config.loader.ini`: loads ini files
- `config.loader.yaml`: loads Yaml files
A third, optional service `comfig.loader.env` is registered if the
[Symfony Dotenv][] component is installed.
## Install
Install using composer:-
$ composer require linkorb/silex-provider-configloader
and optionally require symfony/dotenv during development:-
$ composer require --dev symfony/dotenv
Then register the provider:-
// app/app.php
use LinkORB\ConfigLoader\Provider\ConfigurationLoaderProvider;
...
$app->register(new ConfigurationLoaderProvider);
## Usage
$config = $app['config.loader.ini']->load('path/to/config.ini');
[Symfony Dotenv]:
"The Dotenv Component (The Symfony Components)"