You are here

interface ParameterBagInterface in Service Container 7

Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php \Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface

ParameterBagInterface.

@author Fabien Potencier <fabien@symfony.com>

@api

Hierarchy

Expanded class hierarchy of ParameterBagInterface

All classes that implement ParameterBagInterface

2 files declare their use of ParameterBagInterface
Container.php in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Container.php
ContainerBuilder.php in lib/Drupal/Core/DependencyInjection/ContainerBuilder.php
Contains \Drupal\Core\DependencyInjection\ContainerBuilder.

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php, line 23

Namespace

Symfony\Component\DependencyInjection\ParameterBag
View source
interface ParameterBagInterface {

  /**
   * Clears all parameters.
   *
   * @api
   */
  public function clear();

  /**
   * Adds parameters to the service container parameters.
   *
   * @param array $parameters An array of parameters
   *
   * @api
   */
  public function add(array $parameters);

  /**
   * Gets the service container parameters.
   *
   * @return array An array of parameters
   *
   * @api
   */
  public function all();

  /**
   * Gets a service container parameter.
   *
   * @param string $name The parameter name
   *
   * @return mixed The parameter value
   *
   * @throws ParameterNotFoundException if the parameter is not defined
   *
   * @api
   */
  public function get($name);

  /**
   * Sets a service container parameter.
   *
   * @param string $name  The parameter name
   * @param mixed  $value The parameter value
   *
   * @api
   */
  public function set($name, $value);

  /**
   * Returns true if a parameter name is defined.
   *
   * @param string $name The parameter name
   *
   * @return bool true if the parameter name is defined, false otherwise
   *
   * @api
   */
  public function has($name);

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

  /**
   * Replaces parameter placeholders (%name%) by their values.
   *
   * @param mixed $value A value
   *
   * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist
   */
  public function resolveValue($value);

  /**
   * Escape parameter placeholders %.
   *
   * @param mixed $value
   *
   * @return mixed
   */
  public function escapeValue($value);

  /**
   * Unescape parameter placeholders %.
   *
   * @param mixed $value
   *
   * @return mixed
   */
  public function unescapeValue($value);

}

Members

Namesort descending Modifiers Type Description Overrides
ParameterBagInterface::add public function Adds parameters to the service container parameters. 1
ParameterBagInterface::all public function Gets the service container parameters. 1
ParameterBagInterface::clear public function Clears all parameters. 1
ParameterBagInterface::escapeValue public function Escape parameter placeholders %. 1
ParameterBagInterface::get public function Gets a service container parameter. 1
ParameterBagInterface::has public function Returns true if a parameter name is defined. 1
ParameterBagInterface::resolve public function Replaces parameter placeholders (%name%) by their values for all parameters. 1
ParameterBagInterface::resolveValue public function Replaces parameter placeholders (%name%) by their values. 1
ParameterBagInterface::set public function Sets a service container parameter. 1
ParameterBagInterface::unescapeValue public function Unescape parameter placeholders %. 1