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

Breadcrumb

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

class ServiceLocatorArgument

Represents a closure acting as a service locator.

@author Nicolas Grekas <p@tchwork.com>

Hierarchy

  • class \Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument implements \Symfony\Component\DependencyInjection\Argument\ArgumentInterface

Expanded class hierarchy of ServiceLocatorArgument

13 files declare their use of ServiceLocatorArgument
AutowireLocator.php in vendor/symfony/dependency-injection/Attribute/AutowireLocator.php
CheckTypeDeclarationsPass.php in vendor/symfony/dependency-injection/Compiler/CheckTypeDeclarationsPass.php
ContainerBuilder.php in vendor/symfony/dependency-injection/ContainerBuilder.php
ContainerConfigurator.php in vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php
ControllerArgumentValueResolverPass.php in vendor/symfony/http-kernel/DependencyInjection/ControllerArgumentValueResolverPass.php

... See full list

File

vendor/symfony/dependency-injection/Argument/ServiceLocatorArgument.php, line 19

Namespace

Symfony\Component\DependencyInjection\Argument
View source
class ServiceLocatorArgument implements ArgumentInterface {
    private array $values;
    private ?TaggedIteratorArgument $taggedIteratorArgument = null;
    public function __construct(array|TaggedIteratorArgument $values = []) {
        if ($values instanceof TaggedIteratorArgument) {
            $this->taggedIteratorArgument = $values;
            $values = [];
        }
        $this->setValues($values);
    }
    public function getTaggedIteratorArgument() : ?TaggedIteratorArgument {
        return $this->taggedIteratorArgument;
    }
    public function getValues() : array {
        return $this->values;
    }
    public function setValues(array $values) : void {
        $this->values = $values;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
ServiceLocatorArgument::$taggedIteratorArgument private property
ServiceLocatorArgument::$values private property
ServiceLocatorArgument::getTaggedIteratorArgument public function
ServiceLocatorArgument::getValues public function Overrides ArgumentInterface::getValues
ServiceLocatorArgument::setValues public function Overrides ArgumentInterface::setValues
ServiceLocatorArgument::__construct public function
RSS feed
Powered by Drupal