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

Breadcrumb

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

function PhpDumper::addSyntheticIds

1 call to PhpDumper::addSyntheticIds()
PhpDumper::startClass in vendor/symfony/dependency-injection/Dumper/PhpDumper.php

File

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

Class

PhpDumper
PhpDumper dumps a service container as a PHP class.

Namespace

Symfony\Component\DependencyInjection\Dumper

Code

private function addSyntheticIds() : string {
    $code = '';
    $definitions = $this->container
        ->getDefinitions();
    ksort($definitions);
    foreach ($definitions as $id => $definition) {
        if ($definition->isSynthetic() && 'service_container' !== $id) {
            $code .= '            ' . $this->doExport($id) . " => true,\n";
        }
    }
    return $code ? "        \$this->syntheticIds = [\n{$code}        ];\n" : '';
}
RSS feed
Powered by Drupal