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

Breadcrumb

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

function PhpDumper::generateServiceFiles

1 call to PhpDumper::generateServiceFiles()
PhpDumper::dump in vendor/symfony/dependency-injection/Dumper/PhpDumper.php
Dumps the service container as a PHP class.

File

vendor/symfony/dependency-injection/Dumper/PhpDumper.php, line 1127

Class

PhpDumper
PhpDumper dumps a service container as a PHP class.

Namespace

Symfony\Component\DependencyInjection\Dumper

Code

private function generateServiceFiles(array $services) : iterable {
    $definitions = $this->container
        ->getDefinitions();
    ksort($definitions);
    foreach ($definitions as $id => $definition) {
        if (([
            $file,
            $code,
        ] = $services[$id]) && null !== $file && ($definition->isPublic() || !$this->isTrivialInstance($definition) || isset($this->locatedIds[$id]))) {
            (yield $file => [
                $code,
                $definition->hasTag($this->hotPathTag) || !$definition->hasTag($this->preloadTags[1]) && !$definition->isDeprecated() && !$definition->hasErrors(),
            ]);
        }
    }
}
RSS feed
Powered by Drupal