ContainerInterface
interface ContainerInterface
ContainerInterface is the interface implemented by service container classes.
Constants
EXCEPTION_ON_INVALID_REFERENCE |
|
NULL_ON_INVALID_REFERENCE |
|
IGNORE_ON_INVALID_REFERENCE |
|
Methods
set(string $id, object $service)
Sets a service.
object
get(string $id, int $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE)
Gets a service.
bool
has(string $id)
Returns true if the given service is defined.
bool
initialized(string $id)
Check for whether or not a service has been initialized.
mixed
getParameter(string $name)
Gets a parameter.
bool
hasParameter(string $name)
Checks if a parameter exists.
setParameter(string $name, mixed $value)
Sets a parameter.
Details
at line line 36
set(string $id, object $service)
Sets a service.
at line line 51
object
get(string $id, int $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE)
Gets a service.
at line line 60
bool
has(string $id)
Returns true if the given service is defined.
at line line 69
bool
initialized(string $id)
Check for whether or not a service has been initialized.
at line line 80
mixed
getParameter(string $name)
Gets a parameter.
at line line 89
bool
hasParameter(string $name)
Checks if a parameter exists.
at line line 97
setParameter(string $name, mixed $value)
Sets a parameter.