class InvokableContainerValueResolver implements InvokableContainerValueResolverInterface

Class InvokableContainerValueResolver.

Traits

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.

mixed
__invoke( string $containerLookup)

Invoking this class using function syntax, while providing either a parameter or service name lookup, will return the requested value.

Details

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

Sets the container.

Parameters

ContainerInterface $container

in ContainerAwareTrait at line line 44
ContainerInterface getContainer()

Getter for container property.

Return Value

ContainerInterface

in ContainerAwareTrait at line line 54
bool hasContainer()

Checker for container property.

Return Value

bool

in ContainerAwareTrait at line line 68
mixed getContainerParameter( string $parameter)

Get a parameter from the container.

Parameters

string $parameter

Return Value

mixed

Exceptions

InvalidContainerParameterException

in ContainerAwareTrait at line line 86
bool hasContainerParameter( string $parameter)

Checks if the container parameter exists.

Parameters

string $parameter

Return Value

bool

in ContainerAwareTrait at line line 100
mixed getContainerService( string $service)

Get a service from the container.

Parameters

string $service

Return Value

mixed

Exceptions

InvalidContainerServiceException

in ContainerAwareTrait at line line 118
bool hasContainerService( string $service)

Checks if the container service exists.

Parameters

string $service

Return Value

bool

at line line 42
mixed __invoke( string $containerLookup)

Invoking this class using function syntax, while providing either a parameter or service name lookup, will return the requested value.

Begin all parameter lookups with '%' (and optionally close with the same) to search for parameters. For services, they are the default and require no syntax, BUT using the symfony syntax of begining service names with a '@' is supported and suggested for clarity.

Parameters

string $containerLookup

Return Value

mixed