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

Breadcrumb

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

function ServiceClosureArgument::setValues

Overrides ArgumentInterface::setValues

File

vendor/symfony/dependency-injection/Argument/ServiceClosureArgument.php, line 35

Class

ServiceClosureArgument
Represents a service wrapped in a memoizing closure.

Namespace

Symfony\Component\DependencyInjection\Argument

Code

public function setValues(array $values) : void {
    if ([
        0,
    ] !== array_keys($values)) {
        throw new InvalidArgumentException('A ServiceClosureArgument must hold one and only one value.');
    }
    $this->values = $values;
}
RSS feed
Powered by Drupal