function PhpDumper::isProxyCandidate
4 calls to PhpDumper::isProxyCandidate()
- PhpDumper::addInlineService in vendor/
symfony/ dependency-injection/ Dumper/ PhpDumper.php - PhpDumper::addService in vendor/
symfony/ dependency-injection/ Dumper/ PhpDumper.php - PhpDumper::addServiceInstance in vendor/
symfony/ dependency-injection/ Dumper/ PhpDumper.php - PhpDumper::generateProxyClasses in vendor/
symfony/ dependency-injection/ Dumper/ PhpDumper.php
File
-
vendor/
symfony/ dependency-injection/ Dumper/ PhpDumper.php, line 2343
Class
- PhpDumper
- PhpDumper dumps a service container as a PHP class.
Namespace
Symfony\Component\DependencyInjection\DumperCode
private function isProxyCandidate(Definition $definition, ?bool &$asGhostObject, string $id) : ?Definition {
$asGhostObject = false;
if ([
'Closure',
'fromCallable',
] === $definition->getFactory()) {
return null;
}
if (!$definition->isLazy() || !$this->hasProxyDumper) {
return null;
}
return $this->getProxyDumper()
->isProxyCandidate($definition, $asGhostObject, $id) ? $definition : null;
}