Copied!

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

AbstractInterface
Methods
public abstract add(array $parameters)
 

Adds parameters to the service container parameters.

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

Gets the service container parameters.

public abstract clear()
 

Clears all parameters.

  • return void
  • 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)
 

Removes a parameter.

  • return void
public abstract resolve()
 

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

  • return void
public abstract resolveValue(?mixed $value)
 

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

  • return mixed
  • 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)
 

Sets a service container parameter.

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

Unescape parameter placeholders %.

© 2023 Bruce Wells
Search Namespaces \ Classes
Configuration