class ServiceClosureArgument
Represents a service wrapped in a memoizing closure.
@author Nicolas Grekas <p@tchwork.com>
Hierarchy
- class \Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument implements \Symfony\Component\DependencyInjection\Argument\ArgumentInterface
Expanded class hierarchy of ServiceClosureArgument
16 files declare their use of ServiceClosureArgument
- AbstractConfigurator.php in vendor/
symfony/ dependency-injection/ Loader/ Configurator/ AbstractConfigurator.php - AddConsoleCommandPass.php in vendor/
symfony/ console/ DependencyInjection/ AddConsoleCommandPass.php - AutowireServiceClosure.php in vendor/
symfony/ dependency-injection/ Attribute/ AutowireServiceClosure.php - CheckTypeDeclarationsPass.php in vendor/
symfony/ dependency-injection/ Compiler/ CheckTypeDeclarationsPass.php - ContainerBuilder.php in vendor/
symfony/ dependency-injection/ ContainerBuilder.php
File
-
vendor/
symfony/ dependency-injection/ Argument/ ServiceClosureArgument.php, line 21
Namespace
Symfony\Component\DependencyInjection\ArgumentView source
class ServiceClosureArgument implements ArgumentInterface {
private array $values;
public function __construct(mixed $value) {
$this->values = [
$value,
];
}
public function getValues() : array {
return $this->values;
}
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;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
ServiceClosureArgument::$values | private | property | ||
ServiceClosureArgument::getValues | public | function | Overrides ArgumentInterface::getValues | |
ServiceClosureArgument::setValues | public | function | Overrides ArgumentInterface::setValues | |
ServiceClosureArgument::__construct | public | function |