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

Breadcrumb

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

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\PhpDumper

Code

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));
}
RSS feed
Powered by Drupal