| Name | Size | Mode | Actions |
|---|---|---|---|
| AbstractArgument.php | 925 | 0644 | editdlrm |
| ArgumentInterface.php | 570 | 0644 | editdlrm |
| BoundArgument.php | 1512 | 0644 | editdlrm |
| IteratorArgument.php | 514 | 0644 | editdlrm |
| ReferenceSetArgumentTrait.php | 1309 | 0644 | editdlrm |
| RewindableGenerator.php | 916 | 0644 | editdlrm |
| ServiceClosureArgument.php | 1195 | 0644 | editdlrm |
| ServiceLocator.php | 1287 | 0644 | editdlrm |
| ServiceLocatorArgument.php | 1064 | 0644 | editdlrm |
| TaggedIteratorArgument.php | 2772 | 0644 | editdlrm |
/usr/share/php/Symfony/Component/DependencyInjection/Argument/ServiceLocator.php (1287B)
* * @internal */ class ServiceLocator extends BaseServiceLocator { private $factory; private $serviceMap; private $serviceTypes; public function __construct(\Closure $factory, array $serviceMap, array $serviceTypes = null) { $this->factory = $factory; $this->serviceMap = $serviceMap; $this->serviceTypes = $serviceTypes; parent::__construct($serviceMap); } /** * {@inheritdoc} * * @return mixed */ public function get(string $id) { return isset($this->serviceMap[$id]) ? ($this->factory)(...$this->serviceMap[$id]) : parent::get($id); } /** * {@inheritdoc} */ public function getProvidedServices(): array { return $this->serviceTypes ?? $this->serviceTypes = array_map(function () { return '?'; }, $this->serviceMap); } }