Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ParametersConfigurator.php

function ParametersConfigurator::set

Return value

$this

1 call to ParametersConfigurator::set()
ParametersConfigurator::__invoke in vendor/symfony/dependency-injection/Loader/Configurator/ParametersConfigurator.php

File

vendor/symfony/dependency-injection/Loader/Configurator/ParametersConfigurator.php, line 33

Class

ParametersConfigurator
@author Nicolas Grekas <p@tchwork.com>

Namespace

Symfony\Component\DependencyInjection\Loader\Configurator

Code

public final function set(string $name, mixed $value) : static {
    if ($value instanceof Expression) {
        throw new InvalidArgumentException(\sprintf('Using an expression in parameter "%s" is not allowed.', $name));
    }
    $this->container
        ->setParameter($name, static::processValue($value, true));
    return $this;
}
RSS feed
Powered by Drupal