bluzphp / container
Container package
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
pkg:composer/bluzphp/container
Requires
- php: >=8.2
Requires (Dev)
- phpunit/phpunit: ~11.3
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
Public methods of the Container\Container
:
setFromArray(array $data)
toArray()
resetArray()
Protected methods of the Container\Container
:
doSetContainer(string $key, mixed $value)
- set thevalue
by thekey
doGetContainer(string $key)
– if the container has thekey
, then it returns thevalue
, otherwisenull
doContainsContainer(string $key)
- check the container for thekey
doDeleteContainer(string $key)
- remove thevalue
by thekey
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)
has($key)
remove($key)
Methods of the Container\JsonSerialize
jsonSerialize()
- implementation of the interfaceJsonSerializable