Copied!

ParameterBagInterface is the interface implemented by objects that manage service container parameters.

AbstractInterface
Methods
public abstract add(array $parameters) : void
 

Adds parameters to the service container parameters.

  • throws \LogicException if the parameter cannot be added
public abstract all() : array
 

Gets the service container parameters.

public abstract clear() : void
 

Clears all parameters.

  • throws \LogicException if the ParameterBagInterface cannot be cleared
public abstract escapeValue(?mixed $value) : ?mixed
 

Escape parameter placeholders %.

public abstract get(string $name) : UnitEnum|array|string|int|float|bool|?null
 

Gets a service container parameter.

  • throws \ParameterNotFoundException if the parameter is not defined
public abstract has(string $name) : bool
 

Returns true if a parameter name is defined.

public abstract remove(string $name) : void
 

Removes a parameter.

public abstract resolve() : void
 

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

public abstract resolveValue(?mixed $value) : ?mixed
 

Replaces parameter placeholders (%name%) by their values.

  • throws \ParameterNotFoundException if a placeholder references a parameter that does not exist
public abstract set(string $name, UnitEnum|array|string|int|float|bool|?null $value) : void
 

Sets a service container parameter.

  • throws \LogicException if the parameter cannot be set
public abstract unescapeValue(?mixed $value) : ?mixed
 

Unescape parameter placeholders %.

© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration