Dependency injection container for services
| package |
Kocuj\Di\Container |
|---|
__call(string $method, array $arguments) : object
| Throws |
|
|---|
stringMethod to call
arrayArguments for called method
objectService object
__clone() : void
| Throws |
|
|---|
__construct(\Kocuj\Di\ServiceIdDecorator\ServiceIdDecoratorInterface $serviceIdDecorator, \Kocuj\Di\Service\ServiceFactoryInterface $serviceFactory)
\Kocuj\Di\ServiceIdDecorator\ServiceIdDecoratorInterfaceService identifier decorator
add(\Kocuj\Di\Service\ServiceType $serviceType, string $id, string $source, array $arguments = array()) : \Kocuj\Di\Container\ContainerInterface
| see | \Kocuj\Di\Container\ContainerInterface::add() |
|---|---|
| Throws |
|
stringService identifier
stringService to create
arrayService arguments to inject into constructor
\Kocuj\Di\Container\ContainerInterfaceThis object
addShared(string $id, string $source, array $arguments = array()) : \Kocuj\Di\Container\ContainerInterface
| see | \Kocuj\Di\Container\ContainerInterface::addShared() |
|---|---|
| codeCoverageIgnore | |
| Throws |
|
stringService identifier
stringService to create
arrayService arguments to inject into constructor
\Kocuj\Di\Container\ContainerInterfaceThis object
addStandard(string $id, string $source, array $arguments = array()) : \Kocuj\Di\Container\ContainerInterface
| see | \Kocuj\Di\Container\ContainerInterface::addStandard() |
|---|---|
| codeCoverageIgnore | |
| Throws |
|
stringService identifier
stringService to create
arrayService arguments to inject into constructor
\Kocuj\Di\Container\ContainerInterfaceThis object
checkType(string $id, \Kocuj\Di\Service\ServiceType $serviceType) : boolean
| see | \Kocuj\Di\Container\ContainerInterface::checkType() |
|---|---|
| Throws |
|
stringService identifier
booleanThis service has selected type (true) or not (false)
get(string $id) : object
| see | \Psr\Container\ContainerInterface::get() |
|---|---|
| Throws |
|
stringService identifier
objectService object
getServiceDefinition(string $id) : array
| Throws |
|
|---|
stringService identifier
arrayService definition
getType(string $id) : \Kocuj\Di\Service\ServiceType
| deprecated | |
|---|---|
| see | \Kocuj\Di\Container\Container::checkType() |
| codeCoverageIgnore | |
| Throws |
|
stringService identifier
\Kocuj\Di\Service\ServiceTypeService type
has(string $id) : boolean
| see | \Psr\Container\ContainerInterface::has() |
|---|
stringService
booleanService exists (true) or not (false)
serviceIdDecorator : \Kocuj\Di\ServiceIdDecorator\ServiceIdDecoratorInterface
serviceFactory : \Kocuj\Di\Service\ServiceFactoryInterface
definitions : array
| var |
|---|
array