wordpress-seo
/
vendor_prefixed
/
symfony
/
dependency-injection
/
ParameterBag
/
FrozenParameterBag.php
FrozenParameterBag.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.0, at vendor_prefixed/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php
| 1 | <?php |
| 2 | |
| 3 | /* |
| 4 | * This file is part of the Symfony package. |
| 5 | * |
| 6 | * (c) Fabien Potencier <[email protected]> |
| 7 | * |
| 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | * file that was distributed with this source code. |
| 10 | */ |
| 11 | namespace YoastSEO_Vendor\Symfony\Component\DependencyInjection\ParameterBag; |
| 12 | |
| 13 | use YoastSEO_Vendor\Symfony\Component\DependencyInjection\Exception\LogicException; |
| 14 | /** |
| 15 | * Holds read-only parameters. |
| 16 | * |
| 17 | * @author Fabien Potencier <[email protected]> |
| 18 | */ |
| 19 | class FrozenParameterBag extends \YoastSEO_Vendor\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag |
| 20 | { |
| 21 | /** |
| 22 | * For performance reasons, the constructor assumes that |
| 23 | * all keys are already lowercased. |
| 24 | * |
| 25 | * This is always the case when used internally. |
| 26 | * |
| 27 | * @param array $parameters An array of parameters |
| 28 | */ |
| 29 | public function __construct(array $parameters = []) |
| 30 | { |
| 31 | $this->parameters = $parameters; |
| 32 | $this->resolved = \true; |
| 33 | } |
| 34 | /** |
| 35 | * {@inheritdoc} |
| 36 | */ |
| 37 | public function clear() |
| 38 | { |
| 39 | throw new \YoastSEO_Vendor\Symfony\Component\DependencyInjection\Exception\LogicException('Impossible to call clear() on a frozen ParameterBag.'); |
| 40 | } |
| 41 | /** |
| 42 | * {@inheritdoc} |
| 43 | */ |
| 44 | public function add(array $parameters) |
| 45 | { |
| 46 | throw new \YoastSEO_Vendor\Symfony\Component\DependencyInjection\Exception\LogicException('Impossible to call add() on a frozen ParameterBag.'); |
| 47 | } |
| 48 | /** |
| 49 | * {@inheritdoc} |
| 50 | */ |
| 51 | public function set(string $name, $value) |
| 52 | { |
| 53 | throw new \YoastSEO_Vendor\Symfony\Component\DependencyInjection\Exception\LogicException('Impossible to call set() on a frozen ParameterBag.'); |
| 54 | } |
| 55 | /** |
| 56 | * {@inheritdoc} |
| 57 | */ |
| 58 | public function remove(string $name) |
| 59 | { |
| 60 | throw new \YoastSEO_Vendor\Symfony\Component\DependencyInjection\Exception\LogicException('Impossible to call remove() on a frozen ParameterBag.'); |
| 61 | } |
| 62 | } |
| 63 |