4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\DependencyInjection\ParameterBag;
14 use Symfony\Component\DependencyInjection\Exception\LogicException;
17 * Holds read-only parameters.
19 * @author Fabien Potencier <fabien@symfony.com>
21 class FrozenParameterBag extends ParameterBag
24 * For performance reasons, the constructor assumes that
25 * all keys are already lowercased.
27 * This is always the case when used internally.
29 * @param array $parameters An array of parameters
31 public function __construct(array $parameters = array())
33 $this->parameters = $parameters;
34 $this->resolved = true;
40 public function clear()
42 throw new LogicException('Impossible to call clear() on a frozen ParameterBag.');
48 public function add(array $parameters)
50 throw new LogicException('Impossible to call add() on a frozen ParameterBag.');
56 public function set($name, $value)
58 throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
64 public function remove($name)
66 throw new LogicException('Impossible to call remove() on a frozen ParameterBag.');