bluzphp/container

Container package

1.1.0 2023-02-02 13:30 UTC

This package is auto-updated.

Last update: 2023-05-01 00:11:05 UTC


README

Achievements

PHP >= 8.0+

Latest Stable Version

Build Status

Scrutinizer Code Quality

Total Downloads

License

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 interface
  • has($key) - implementation of the PSR-11: Container interface
  • remove($key)

Methods of the Container\JsonSerialize

  • jsonSerialize() - implementation of the interface JsonSerializable