gephart/configuration

Gephart Configuration Component

0.5 2017-10-02 15:33 UTC

This package is auto-updated.

Last update: 2024-12-12 14:10:23 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...)