You are here

class FrozenParameterBag in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php \Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag

Holds read-only parameters.

@author Fabien Potencier <fabien@symfony.com>

Hierarchy

Expanded class hierarchy of FrozenParameterBag

5 files declare their use of FrozenParameterBag
Container.php in vendor/symfony/dependency-injection/Container.php
FrozenParameterBagTest.php in vendor/symfony/dependency-injection/Tests/ParameterBag/FrozenParameterBagTest.php
services10.php in vendor/symfony/dependency-injection/Tests/Fixtures/php/services10.php
services12.php in vendor/symfony/dependency-injection/Tests/Fixtures/php/services12.php
services9_compiled.php in vendor/symfony/dependency-injection/Tests/Fixtures/php/services9_compiled.php

File

vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php, line 21

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
   */
  public function __construct(array $parameters = array()) {
    $this->parameters = $parameters;
    $this->resolved = true;
  }

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

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

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

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

}

Members

Namesort descending Modifiers Type Description Overrides
FrozenParameterBag::add public function Adds parameters to the service container parameters. Overrides ParameterBag::add
FrozenParameterBag::clear public function Clears all parameters. Overrides ParameterBag::clear
FrozenParameterBag::remove public function Removes a parameter. Overrides ParameterBag::remove
FrozenParameterBag::set public function Sets a service container parameter. 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::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