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

Breadcrumb

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

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

Code

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