trait ContainerAwareTrait

Class ContainerAwareTrait.

Methods

setContainer( ContainerInterface $container = null)

Sets the container.

ContainerInterface
getContainer()

Getter for container property.

bool
hasContainer()

Checker for container property.

mixed
getContainerParameter( string $parameter)

Get a parameter from the container.

bool
hasContainerParameter( string $parameter)

Checks if the container parameter exists.

mixed
getContainerService( string $service)

Get a service from the container.

bool
hasContainerService( string $service)

Checks if the container service exists.

Details

at line line 34
setContainer( ContainerInterface $container = null)

Sets the container.

Parameters

ContainerInterface $container

at line line 44
ContainerInterface getContainer()

Getter for container property.

Return Value

ContainerInterface

at line line 54
bool hasContainer()

Checker for container property.

Return Value

bool

at line line 68
mixed getContainerParameter( string $parameter)

Get a parameter from the container.

Parameters

string $parameter

Return Value

mixed

Exceptions

InvalidContainerParameterException

at line line 86
bool hasContainerParameter( string $parameter)

Checks if the container parameter exists.

Parameters

string $parameter

Return Value

bool

at line line 100
mixed getContainerService( string $service)

Get a service from the container.

Parameters

string $service

Return Value

mixed

Exceptions

InvalidContainerServiceException

at line line 118
bool hasContainerService( string $service)

Checks if the container service exists.

Parameters

string $service

Return Value

bool