mati-core / constant
Database constants for MatiCore
v1.0.2
2021-09-02 14:04 UTC
Requires
- php: >=8.0
- baraja-core/doctrine: ~3.0
- baraja-core/package-manager: ~2.0
- nette/di: ^3.0
- nette/utils: ^3.0
Requires (Dev)
- nette/tester: ~2.0
- phpstan/phpstan: ^0.12
- phpstan/phpstan-nette: ^0.12.6
- tracy/tracy: ^2.3
This package is auto-updated.
Last update: 2024-10-29 06:12:24 UTC
README
Database constants for Mati-Core
Install
composer require mati-core/constant
Using
Include to presenter
use \MatiCore\Constant\ConstantManagerAccessor; class *Presenter extends BasePresenter { /** * @var ConstantManagerAccessor * @inject */ public ConstantManagerAccessor $constantManager; }
Load constant value
$this->constantManager->get()->get('constant-key');
Set constant value
$this->constantManager->get()->set('constant-key', $value);