bluzphp / container
Container package
1.1.0
2023-02-02 13:30 UTC
Requires
- php: >=8.1
Requires (Dev)
- php-coveralls/php-coveralls: ~2.5
- phploc/phploc: ~7.0
- phpunit/phpunit: ~9.5
- squizlabs/php_codesniffer: ~3.7
This package is auto-updated.
Last update: 2023-05-01 00:11:05 UTC
README
Achievements
Usage
Example of the Registry class:
namespace Bluz\Registry;
use Bluz\Container;
class Registry {
use Container\Container;
use Container\JsonSerialize;
use Container\RegularAccess;
}
Methods
Trait Container\Container
:
setFromArray(array $data)
toArray()
resetArray()
Methods of the Container\ArrayAccess
(implementation of the interface ArrayAccess
):
offsetSet($offset, $value)
offsetExists($offset)
offsetUnset($offset)
offsetGet($offset)
Methods of the Container\MagicAccess
:
__set($key, $value)
__get($key)
__isset($key)
__unset($key)
Methods of the Container\RegularAccess
:
set($key, $value)
get($key)
- implementation of the PSR-11: Container interfacehas($key)
- implementation of the PSR-11: Container interfaceremove($key)
Methods of the Container\JsonSerialize
jsonSerialize()
- implementation of the interfaceJsonSerializable