function LazyServiceDumper::getProxyClass
2 calls to LazyServiceDumper::getProxyClass()
- LazyServiceDumper::getProxyCode in vendor/
symfony/ dependency-injection/ LazyProxy/ PhpDumper/ LazyServiceDumper.php - Generates the code for the lazy proxy.
- LazyServiceDumper::getProxyFactoryCode in vendor/
symfony/ dependency-injection/ LazyProxy/ PhpDumper/ LazyServiceDumper.php - Generates the code to be used to instantiate a proxy in the dumped factory code.
File
-
vendor/
symfony/ dependency-injection/ LazyProxy/ PhpDumper/ LazyServiceDumper.php, line 142
Class
- LazyServiceDumper
- @author Nicolas Grekas <p@tchwork.com>
Namespace
Symfony\Component\DependencyInjection\LazyProxy\PhpDumperCode
public function getProxyClass(Definition $definition, bool $asGhostObject, ?\ReflectionClass &$class = null) : string {
$class = 'object' !== $definition->getClass() ? $definition->getClass() : 'stdClass';
$class = new \ReflectionClass($class);
return preg_replace('/^.*\\\\/', '', $definition->getClass()) . ($asGhostObject ? 'Ghost' : 'Proxy') . ucfirst(substr(hash('xxh128', $this->salt . '+' . $class->name . '+' . serialize($definition->getTag('proxy'))), -7));
}