dhii / container-helper-base
Helper functionality for working with container.
Installs: 7 062
Dependents: 15
Suggesters: 2
Security: 0
Stars: 0
Watchers: 3
Forks: 1
Open Issues: 2
pkg:composer/dhii/container-helper-base
Requires
- php: ^5.4 | ^7.0
Requires (Dev)
- codeclimate/php-test-reporter: <=0.3.2
- dhii/php-cs-fixer-config: ^0.1
- dhii/stringable-interface: ^0.1
- phpunit/phpunit: ^4.8
- psr/container: ^1.0
- ptrofimov/xpmock: ^1.1
This package is auto-updated.
Last update: 2025-10-07 06:29:04 UTC
README
Helper functionality for working with container.
Traits
- ContainerGetCapableTrait- Allows retrieving values by key from anything that is a known container representation. Types include- ContainerInterface,- array,- ArrayAccess, and- stdClass. Accessing a non-existing key throws a- NotFoundExceptionInterface.
- ContainerGetPathCapableTrait- Allows getting data from nested container using passed path (list of segments).
- ContainerHasCapableTrait- Allows checking for values by key from anything that is a known container implementation.
- ContainerListHasCapableTrait- Allows checking for a key on a list of containers.
- ContainerListGetCapableTrait- Allows retrieving a value from a list of containers.
- ContainerSetCapableTrait- Allows setting a value on a writable container.
- ContainerSetPathCapableTrait- Allows setting a value on a nested container using path.
- ContainerSetManyCapableTrait- Allows setting multiple values on a writable container.
- ContainerUnsetCapableTrait- Allows unsetting a value on a writable container.
- ContainerUnsetManyCapableTrait- Allows unsetting multiple values on a writable container.
- NormalizeContainerCapableTrait- Functionality for container normalization.
- NormalizeWritableContainerCapableTrait- Functionality for normalizing writable containers.
- NormalizeKeyCapableTrait- Allows normalizing container keys.