$services
$services : array
Services
Service locator class
setServices(array $services) : \Pop\Service\Locator
Set service objects from an array of services
array | $services |
set(string $name, mixed $service) : \Pop\Service\Locator
Set a service. It will overwrite any previous service with the same name.
A service can be a CallableObject, callable string, or an array that contains a 'call' key and an optional 'params' key. Valid callable strings are:
'someFunction'
'SomeClass'
'SomeClass->foo'
'SomeClass::bar'
string | $name | |
mixed | $service |
setCall(string $name, mixed $call) : \Pop\Service\Locator
Set a service's callable string or object
string | $name | |
mixed | $call |
setParams(string $name, mixed $params) : \Pop\Service\Locator
Set a service's parameters
string | $name | |
mixed | $params |
addParam(string $name, mixed $param, mixed $key = null) : \Pop\Service\Locator
Add to a service's parameters
string | $name | |
mixed | $param | |
mixed | $key |
removeParam(string $name, mixed $param, mixed $key = null) : \Pop\Service\Locator
Remove a service's parameters
string | $name | |
mixed | $param | |
mixed | $key |
remove(string $name) : \Pop\Service\Locator
Remove a service
string | $name |
__set(string $name, mixed $value) : \Pop\Service\Locator
Set a service
string | $name | |
mixed | $value |
__unset(string $name) : \Pop\Service\Locator
Unset a service
string | $name |
offsetSet(string $offset, mixed $value) : \Pop\Service\Locator
Set a service
string | $offset | |
mixed | $value |
offsetUnset(string $offset) : \Pop\Service\Locator
Unset a service
string | $offset |