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\DumperCode
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" : '';
}