PHP Class Symfony\Component\DependencyInjection\ParameterBag\ParameterBag

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

Protected Properties

Property Type Description
$parameters
$resolved

Public Methods

Method 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 method

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

add() public method

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

all() public method

Gets the service container parameters.
public all ( ) : array
return array An array of parameters

clear() public method

Clears all parameters.
public clear ( )

escapeValue() public method

{@inheritDoc}
public escapeValue ( $value )

get() public method

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

has() public method

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

isResolved() public method

public isResolved ( )

remove() public method

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

resolve() public method

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

resolveString() public method

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)
return string The resolved string

resolveValue() public method

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)
return mixed The resolved value

set() public method

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

unescapeValue() public method

public unescapeValue ( $value )

Property Details

$parameters protected_oe property

protected $parameters

$resolved protected_oe property

protected $resolved