netleak / config-params
Getters to find out in which modes are the Nette application.
Installs: 4 863
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=8.3
- nette/di: ~3.0
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpstan/phpstan-phpunit: ^1.3
- phpunit/phpunit: ^10.3
- slevomat/coding-standard: ^8.13
README
Getters to find out in which modes are the Nette application.
Installation
composer require netleak/config-params
Write this to config.neon
extensions: - Netleak\DI\ConfigParamsExtension
Usage
use Netleak\ConfigParams; class BasePresenter extends Nette\Application\UI\Presenter { public ConfigParams $configParams; public function injectConfigParams(ConfigParams $configParams): void { $this->configParams = $configParams; } function startup() { parent::startup(); $this->getTemplate()->setParameters(array('debugMode' => $this->configParams->getDebugMode())); } }