Container package

1.1.1 2023-11-08 13:18 UTC

This package is auto-updated.

Last update: 2024-06-08 14:26:21 UTC



PHP >= 8.2+

Latest Stable Version

Build Status

Scrutinizer Code Quality

Total Downloads



Example of the Registry class:

namespace Bluz\Registry;

use Bluz\Container;

class Registry {
    use Container\Container;
    use Container\JsonSerialize;
    use Container\RegularAccess;


Public methods of the Container\Container:

  • setFromArray(array $data)
  • toArray()
  • resetArray()

Protected methods of the Container\Container:

  • doSetContainer(string $key, mixed $value) - set the value by the key
  • doGetContainer(string $key) – if the container has the key, then it returns the value, otherwise null
  • doContainsContainer(string $key) - check the container for the key
  • doDeleteContainer(string $key) - remove the value by the key

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 interface JsonSerializable