gephart / configuration
Gephart Configuration Component
0.5
2017-10-02 15:33 UTC
Requires
- php: >=7.1
Requires (Dev)
README
Dependencies
- PHP >= 7.1
Instalation
composer require gephart/configuration
Basic using
/config/my.json
/index.php
$configuration = new \Gephart\Configuration\Configuration(); $configuration->setDirectory(__DIR__ . "/config"); $my_configuration = $configuration->get("my"); // Array data from my.json
Usign with gephart/dependency-injection
$container = new \Gephart\DependencyInjection\Container(); $configuration = $container->get(\Gephart\Configuration\Configuration::class); $configuration->setDirectory(__DIR__ . "/config"); // Next code (routing etc...)