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

Breadcrumb

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

function ServiceLocator::getIterator

File

vendor/symfony/dependency-injection/ServiceLocator.php, line 85

Class

ServiceLocator
@author Robin Chalas <robin.chalas@gmail.com> @author Nicolas Grekas <p@tchwork.com>

Namespace

Symfony\Component\DependencyInjection

Code

public function getIterator() : \Traversable {
    foreach ($this->getProvidedServices() as $id => $config) {
        (yield $id => $this->get($id));
    }
}
RSS feed
Powered by Drupal