bermudaphp / registry
v1.0.1
2022-01-21 17:33 UTC
Requires
- php: ^7.4 || ^8.0 || ^8.1
This package is auto-updated.
Last update: 2024-10-21 22:56:41 UTC
README
composer require bermudaphp/registry
Set
Registry::set('message', 'Hello World'); Registry::getInstance()->offsetSet('message', 'Hello World!'); Registry::getInstance()['message'] = 'Hello, Jane!';
Get
Registry::get('MessaGe', 'default value'); // default value Registry::getInstance()->offsetGet('message'); // Hello, Jane! Registry::getInstance()['message']; // Hello, Jane!;
Exists
Registry::has('appVersion'); // false Registry::getInstance()->offsetExists('message'); // true isset(Registry::getInstance()['message']); // true;
Unset
Registry::remove('message'); Registry::getInstance()->offsetUnset('message'); unset(Registry::getInstance()['message']);