PHP Class Symfony\Component\DependencyInjection\ParameterBag\ParameterBag

Author: Fabien Potencier ([email protected])
Inheritance: implements Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface
Afficher le fichier Open project: pmjones/php-framework-benchmarks Class Usage Examples

Protected Properties

Свойство Type Description
$parameters
$resolved

Méthodes publiques

Méthode Description
__construct ( array $parameters = [] ) Constructor.
add ( array $parameters ) Adds parameters to the service container parameters.
all ( ) : array Gets the service container parameters.
clear ( ) Clears all parameters.
escapeValue ( $value ) {@inheritDoc}
get ( string $name ) : mixed Gets a service container parameter.
has ( string $name ) : boolean Returns true if a parameter name is defined.
isResolved ( )
remove ( string $name ) Removes a parameter.
resolve ( ) Replaces parameter placeholders (%name%) by their values for all parameters.
resolveString ( string $value, array $resolving = [] ) : string Resolves parameters inside a string
resolveValue ( mixed $value, array $resolving = [] ) : mixed Replaces parameter placeholders (%name%) by their values.
set ( string $name, mixed $value ) Sets a service container parameter.
unescapeValue ( $value )

Method Details

__construct() public méthode

Constructor.
public __construct ( array $parameters = [] )
$parameters array An array of parameters

add() public méthode

Adds parameters to the service container parameters.
public add ( array $parameters )
$parameters array An array of parameters

all() public méthode

Gets the service container parameters.
public all ( ) : array
Résultat array An array of parameters

clear() public méthode

Clears all parameters.
public clear ( )

escapeValue() public méthode

{@inheritDoc}
public escapeValue ( $value )

get() public méthode

Gets a service container parameter.
public get ( string $name ) : mixed
$name string The parameter name
Résultat mixed The parameter value

has() public méthode

Returns true if a parameter name is defined.
public has ( string $name ) : boolean
$name string The parameter name
Résultat boolean true if the parameter name is defined, false otherwise

isResolved() public méthode

public isResolved ( )

remove() public méthode

Removes a parameter.
public remove ( string $name )
$name string The parameter name

resolve() public méthode

Replaces parameter placeholders (%name%) by their values for all parameters.
public resolve ( )

resolveString() public méthode

Resolves parameters inside a string
public resolveString ( string $value, array $resolving = [] ) : string
$value string The string to resolve
$resolving array An array of keys that are being resolved (used internally to detect circular references)
Résultat string The resolved string

resolveValue() public méthode

Replaces parameter placeholders (%name%) by their values.
public resolveValue ( mixed $value, array $resolving = [] ) : mixed
$value mixed A value
$resolving array An array of keys that are being resolved (used internally to detect circular references)
Résultat mixed The resolved value

set() public méthode

Sets a service container parameter.
public set ( string $name, mixed $value )
$name string The parameter name
$value mixed The parameter value

unescapeValue() public méthode

public unescapeValue ( $value )

Property Details

$parameters protected_oe property

protected $parameters

$resolved protected_oe property

protected $resolved