function ServiceLocator::get
Same name in this branch
- 11.1.x vendor/symfony/dependency-injection/ServiceLocator.php \Symfony\Component\DependencyInjection\ServiceLocator::get()
Overrides ServiceLocator::get
File
-
vendor/
symfony/ dependency-injection/ Argument/ ServiceLocator.php, line 31
Class
- ServiceLocator
- @author Nicolas Grekas <p@tchwork.com>
Namespace
Symfony\Component\DependencyInjection\ArgumentCode
public function get(string $id) : mixed {
return match (\count($this->serviceMap[$id] ?? [])) { 0 => parent::get($id),
1 => $this->serviceMap[$id][0],
default => ($this->factory)(...$this->serviceMap[$id]),
};
}