You are here

class FrozenParameterBag in Service Container 7.2

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

Holds read-only parameters.

@author Fabien Potencier <fabien@symfony.com>

@api

Hierarchy

Expanded class hierarchy of FrozenParameterBag

5 files declare their use of FrozenParameterBag
Container.php in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Container.php
FrozenParameterBagTest.php in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/ParameterBag/FrozenParameterBagTest.php
services10.php in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php
services12.php in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php
services9_compiled.php in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php

File

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

Namespace

Symfony\Component\DependencyInjection\ParameterBag
View source
class FrozenParameterBag extends ParameterBag {

  /**
   * Constructor.
   *
   * For performance reasons, the constructor assumes that
   * all keys are already lowercased.
   *
   * This is always the case when used internally.
   *
   * @param array $parameters An array of parameters
   *
   * @api
   */
  public function __construct(array $parameters = array()) {
    $this->parameters = $parameters;
    $this->resolved = true;
  }

  /**
   * {@inheritdoc}
   *
   * @api
   */
  public function clear() {
    throw new LogicException('Impossible to call clear() on a frozen ParameterBag.');
  }

  /**
   * {@inheritdoc}
   *
   * @api
   */
  public function add(array $parameters) {
    throw new LogicException('Impossible to call add() on a frozen ParameterBag.');
  }

  /**
   * {@inheritdoc}
   *
   * @api
   */
  public function set($name, $value) {
    throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FrozenParameterBag::add public function @api Overrides ParameterBag::add
FrozenParameterBag::clear public function @api Overrides ParameterBag::clear
FrozenParameterBag::set public function @api Overrides ParameterBag::set
FrozenParameterBag::__construct public function Constructor. Overrides ParameterBag::__construct
ParameterBag::$parameters protected property
ParameterBag::$resolved protected property
ParameterBag::all public function Gets the service container parameters. Overrides ParameterBagInterface::all
ParameterBag::escapeValue public function Escape parameter placeholders %. Overrides ParameterBagInterface::escapeValue
ParameterBag::get public function Gets a service container parameter. Overrides ParameterBagInterface::get
ParameterBag::has public function Returns true if a parameter name is defined. Overrides ParameterBagInterface::has
ParameterBag::isResolved public function
ParameterBag::remove public function Removes a parameter.
ParameterBag::resolve public function Replaces parameter placeholders (%name%) by their values for all parameters. Overrides ParameterBagInterface::resolve
ParameterBag::resolveString public function Resolves parameters inside a string.
ParameterBag::resolveValue public function Replaces parameter placeholders (%name%) by their values. Overrides ParameterBagInterface::resolveValue
ParameterBag::unescapeValue public function Unescape parameter placeholders %. Overrides ParameterBagInterface::unescapeValue