Container
class Container implements ContainerInterface, ArikaimContainerInterface, ArrayAccess
Dependency injection container.
Methods
Container constructor
Clone container
Get container service
Get service from container
Call service method
Check if service exists in container PSR-11 ContainerInterface
Add service to container
Replace service in container
Remove service from container
Get array with all service id in container
ArrayAccess interface function
ArrayAccess interface function
ArrayAccess interface function
ArrayAccess interface function
Details
at line 36
__construct(array $services = null)
Container constructor
at line 47
ContainerInterface
clone(array $items)
Clone container
at line 61
mixed|null
getItem(string $id, mixed|null $default = null)
Get container service
at line 73
mixed
get(string $id)
Get service from container
at line 95
mixed|null
call(string $id, string $method, array $params = [])
Call service method
at line 114
bool
has(string $id)
Check if service exists in container PSR-11 ContainerInterface
at line 128
void
add(string $id, mixed $service, boolean $replace = false)
Add service to container
at line 143
void
replace(string $id, mixed $service)
Replace service in container
at line 154
void
remove(string $id)
Remove service from container
at line 166
array
getServicesList()
Get array with all service id in container
at line 177
bool
offsetExists(string $id)
ArrayAccess interface function
at line 188
mixed
offsetGet(string $id)
ArrayAccess interface function
at line 200
void
offsetSet(string $id, mixed $service)
ArrayAccess interface function
at line 211
void
offsetUnset(string $id)
ArrayAccess interface function