Download the PHP package thruster/container without Composer
On this page you can find all versions of the php package thruster/container. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download thruster/container
More information about thruster/container
Files in thruster/container
Package container
Short Description Thruster Container Component
License MIT
Homepage https://thruster.io
Informations about the package container
Container Component
[]
(https://github.com/ThrusterIO/container/releases)
[
]
(LICENSE)
[
]
(https://travis-ci.org/ThrusterIO/container)
[
]
(https://scrutinizer-ci.com/g/ThrusterIO/container)
[
]
(https://scrutinizer-ci.com/g/ThrusterIO/container)
[
]
(https://packagist.org/packages/thruster/container)
[]
(mailto:[email protected])
The Thruster Container Component. Container is small self contained dependency injection container implementing ContainerInterface
interface.
Install
Via Composer
Usage
Just create instance of Container:
Also you can pass preset array of values to constructor.
Container has a bunch of simple named functions to use container: has, set, get, remove:
Container also support \ArrayAccess
By default Container always returns the same instance of identifier, but you can create a factory definition which will return always new instance of identifier.
Container provides a way to extend container with ContainerProviderInterface
Errors
- Container throws
NotFoundException
if identifier is not found in container. - Container throws
IdentifierFrozenException
when trying to set definition for already frozen identifier. (Frozen means when value was already used once)
Testing
Contributing
Please see CONDUCT for details.
License
Please see License File for more information.