- Full name:
\App\Shared\Services\Registry - This class is marked as final and can't be subclassed
- This class implements:
ContainerInterface - This class is a Final class
Properties
container
Methods
prop
Retrieves a sub-key from the registry.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$object |
string | name of an object to retrieve a key from. |
$key |
bool | (optional) key to retrieve from the object. |
$default |
mixed|null | (optional) default value for missing objects or keys. |
Throws:
get
Parameters:
| Parameter | Type | Description |
|---|---|---|
$id |
string |
has
Parameters:
| Parameter | Type | Description |
|---|---|---|
$id |
string |
set
Sets a registry parameter.
If a registry parameter with the name already exists the value will be overridden.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$id |
string | A registry parameter name. |
$value |
mixed | A registry parameter value |
add
Sets an array of registry parameters.
If an existing registry parameter name matches any of the keys in the supplied array, the associated value will be overridden.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$parameters |
array | An associative array of registry parameters and their associated values. |
getAll
Retrieves all configuration parameters.
Return Value:
An associative array of configuration parameters.
clear
Clears all current container parameters.