Dependency injection container for services
package |
Kocuj\Di\Container |
---|
__call(string $method, array $arguments) : object
Throws |
|
---|
string
Method to call
array
Arguments for called method
object
Service object
__clone() : void
Throws |
|
---|
__construct(\Kocuj\Di\ServiceIdDecorator\ServiceIdDecoratorInterface $serviceIdDecorator, \Kocuj\Di\Service\ServiceFactoryInterface $serviceFactory)
\Kocuj\Di\ServiceIdDecorator\ServiceIdDecoratorInterface
Service 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 |
|
string
Service identifier
string
Service to create
array
Service arguments to inject into constructor
\Kocuj\Di\Container\ContainerInterface
This object
addShared(string $id, string $source, array $arguments = array()) : \Kocuj\Di\Container\ContainerInterface
see | \Kocuj\Di\Container\ContainerInterface::addShared() |
---|---|
codeCoverageIgnore | |
Throws |
|
string
Service identifier
string
Service to create
array
Service arguments to inject into constructor
\Kocuj\Di\Container\ContainerInterface
This object
addStandard(string $id, string $source, array $arguments = array()) : \Kocuj\Di\Container\ContainerInterface
see | \Kocuj\Di\Container\ContainerInterface::addStandard() |
---|---|
codeCoverageIgnore | |
Throws |
|
string
Service identifier
string
Service to create
array
Service arguments to inject into constructor
\Kocuj\Di\Container\ContainerInterface
This object
checkType(string $id, \Kocuj\Di\Service\ServiceType $serviceType) : boolean
see | \Kocuj\Di\Container\ContainerInterface::checkType() |
---|---|
Throws |
|
string
Service identifier
boolean
This service has selected type (true) or not (false)
get(string $id) : object
see | \Psr\Container\ContainerInterface::get() |
---|---|
Throws |
|
string
Service identifier
object
Service object
getServiceDefinition(string $id) : array
Throws |
|
---|
string
Service identifier
array
Service definition
getType(string $id) : \Kocuj\Di\Service\ServiceType
deprecated | |
---|---|
see | \Kocuj\Di\Container\Container::checkType() |
codeCoverageIgnore | |
Throws |
|
string
Service identifier
\Kocuj\Di\Service\ServiceType
Service type
has(string $id) : boolean
see | \Psr\Container\ContainerInterface::has() |
---|
string
Service
boolean
Service exists (true) or not (false)
serviceIdDecorator : \Kocuj\Di\ServiceIdDecorator\ServiceIdDecoratorInterface
serviceFactory : \Kocuj\Di\Service\ServiceFactoryInterface
definitions : array
var |
---|
array