ParameterBag
in package
implements
ParameterBagInterface
Holds parameters.
Tags
Interfaces, Classes and Traits
- ParameterBagInterface
- ParameterBagInterface is the interface implemented by objects that manage service container parameters.
Table of Contents
- $parameters : mixed
- $resolved : mixed
- __construct() : mixed
- add() : mixed
- Adds parameters to the service container parameters.
- all() : array<string|int, mixed>
- Gets the service container parameters.
- clear() : mixed
- Clears all parameters.
- escapeValue() : mixed
- Escape parameter placeholders %.
- get() : array<string|int, mixed>|bool|string|int|float|UnitEnum|null
- Gets a service container parameter.
- has() : bool
- Returns true if a parameter name is defined.
- isResolved() : mixed
- remove() : mixed
- Removes a parameter.
- resolve() : mixed
- Replaces parameter placeholders (%name%) by their values for all parameters.
- resolveString() : mixed
- Resolves parameters inside a string.
- resolveValue() : mixed
- Replaces parameter placeholders (%name%) by their values.
- set() : mixed
- Sets a service container parameter.
- unescapeValue() : mixed
- Unescape parameter placeholders %.
Properties
$parameters
protected
mixed
$parameters
= []
$resolved
protected
mixed
$resolved
= false
Methods
__construct()
public
__construct([array<string|int, mixed> $parameters = [] ]) : mixed
Parameters
- $parameters : array<string|int, mixed> = []
Return values
mixed —add()
Adds parameters to the service container parameters.
public
add(array<string|int, mixed> $parameters) : mixed
Parameters
- $parameters : array<string|int, mixed>
Return values
mixed —all()
Gets the service container parameters.
public
all() : array<string|int, mixed>
Return values
array<string|int, mixed> —clear()
Clears all parameters.
public
clear() : mixed
Return values
mixed —escapeValue()
Escape parameter placeholders %.
public
escapeValue(mixed $value) : mixed
Parameters
- $value : mixed
Return values
mixed —get()
Gets a service container parameter.
public
get(string $name) : array<string|int, mixed>|bool|string|int|float|UnitEnum|null
Parameters
- $name : string
Return values
array<string|int, mixed>|bool|string|int|float|UnitEnum|null —has()
Returns true if a parameter name is defined.
public
has(string $name) : bool
Parameters
- $name : string
Return values
bool —isResolved()
public
isResolved() : mixed
Return values
mixed —remove()
Removes a parameter.
public
remove(string $name) : mixed
Parameters
- $name : string
Return values
mixed —resolve()
Replaces parameter placeholders (%name%) by their values for all parameters.
public
resolve() : mixed
Return values
mixed —resolveString()
Resolves parameters inside a string.
public
resolveString(string $value[, array<string|int, mixed> $resolving = [] ]) : mixed
Parameters
- $value : string
- $resolving : array<string|int, mixed> = []
-
An array of keys that are being resolved (used internally to detect circular references)
Tags
Return values
mixed —resolveValue()
Replaces parameter placeholders (%name%) by their values.
public
resolveValue(mixed $value[, array<string|int, mixed> $resolving = [] ]) : mixed
Parameters
- $value : mixed
-
A value
- $resolving : array<string|int, mixed> = []
-
An array of keys that are being resolved (used internally to detect circular references)
Tags
Return values
mixed —set()
Sets a service container parameter.
public
set(string $name, mixed $value) : mixed
Parameters
- $name : string
- $value : mixed
-
The parameter value
Return values
mixed —unescapeValue()
Unescape parameter placeholders %.
public
unescapeValue(mixed $value) : mixed
Parameters
- $value : mixed