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

Breadcrumb

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

function PhpDumper::addFileMap

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

File

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

Class

PhpDumper
PhpDumper dumps a service container as a PHP class.

Namespace

Symfony\Component\DependencyInjection\Dumper

Code

private function addFileMap() : string {
    $code = '';
    $definitions = $this->container
        ->getDefinitions();
    ksort($definitions);
    foreach ($definitions as $id => $definition) {
        if (!$definition->isSynthetic() && $definition->isPublic() && !$this->isHotPath($definition)) {
            $code .= \sprintf("            %s => '%s',\n", $this->doExport($id), $this->generateMethodName($id));
        }
    }
    return $code ? "        \$this->fileMap = [\n{$code}        ];\n" : '';
}
RSS feed
Powered by Drupal