adt / configurator
Extended nette/configurator
Installs: 46 491
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 14
Forks: 0
Open Issues: 0
Requires
- josegonzalez/dotenv: ^4.0
- nette/bootstrap: ^3.0
- tracy/tracy: ^2.6
- dev-master
- v5.3.3
- v5.3.2
- v5.3.1
- v5.3
- v5.2.1
- v5.2
- v5.1.1
- v5.1
- v5.0.4
- v5.0.3
- v5.0.2
- v5.0.1
- v5.0
- v4.3
- v4.2
- v4.1.1
- v4.1
- v4.0.1
- v4.0
- v3.0.1
- v3.0
- v2.2
- v2.1
- v2.0
- v1.3
- v1.2.2
- v1.2.1
- v1.2
- v1.1
- v1.0
- v0.4.3
- v0.4.2
- v0.4.1
- v0.4
- v0.3
- v0.2
- v0.1
- dev-app-debug
- dev-f-allows-to-have-numeric-string-with-zero-on-start-as-string
- dev-improvements
This package is auto-updated.
Last update: 2024-10-09 06:23:53 UTC
README
Extended nette/configurator.
Installation
composer require adt/configurator
Usage
$configurator = new Configurator();
$configurator->loadEnv(__DIR__ . '/..', ['.env.common']);
// Uncomment line below to create hash for new developer.
// ADT\Configurator::newDeveloper('JohnDoe');
$configurator
->addDeveloper(json_decode($_ENV['NETTE_DEVELOPERS'], true))
->setDebugMode((bool) $_ENV['NETTE_DEBUG']);
$configurator
->setConfigDirectory(__DIR__ . '/config')
->addConfig('common')
->addConfig('interface/' . php_sapi_name())
->addConfig('stage/' . $_ENV['STAGE'])
->addConfig(explode(',', $_ENV['NETTE_ENV']))
->addConfig(Configurator::isCli() && Configurator::get('country') ? 'cli-country' : null)
->addConfig(Configurator::get('country') ? 'env/' . $_ENV['STAGE'] . '-' . Configurator::get('country') : null)
->addConfig($_ENV['NETTE_TEST'] ? 'test' : null);