gephart/configuration

Gephart Configuration Component

0.5 2017-10-02 15:33 UTC

This package is not auto-updated.

Last update: 2024-02-18 21:06:04 UTC


README

php

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...)