dhii / container-helper-base
Helper functionality for working with container.
Installs: 6 385
Dependents: 15
Suggesters: 2
Security: 0
Stars: 0
Watchers: 4
Forks: 1
Open Issues: 2
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: 2024-11-07 04:15:26 UTC
README
Helper functionality for working with container.
Traits
ContainerGetCapableTrait
- Allows retrieving values by key from anything that is a known container representation. Types includeContainerInterface
,array
,ArrayAccess
, andstdClass
. Accessing a non-existing key throws aNotFoundExceptionInterface
.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.