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

Breadcrumb

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

function LazyObjectRegistry::getScope

8 calls to LazyObjectRegistry::getScope()
LazyGhostTrait::__get in vendor/symfony/var-exporter/LazyGhostTrait.php
LazyGhostTrait::__isset in vendor/symfony/var-exporter/LazyGhostTrait.php
LazyGhostTrait::__set in vendor/symfony/var-exporter/LazyGhostTrait.php
LazyGhostTrait::__unset in vendor/symfony/var-exporter/LazyGhostTrait.php
LazyProxyTrait::__get in vendor/symfony/var-exporter/LazyProxyTrait.php

... See full list

File

vendor/symfony/var-exporter/Internal/LazyObjectRegistry.php, line 122

Class

LazyObjectRegistry
Stores the state of lazy objects and caches related reflection information.

Namespace

Symfony\Component\VarExporter\Internal

Code

public static function getScope($propertyScopes, $class, $property, $readonlyScope = null) {
    if (null === $readonlyScope && !isset($propertyScopes[$k = "\x00{$class}\x00{$property}"]) && !isset($propertyScopes[$k = "\x00*\x00{$property}"])) {
        return null;
    }
    $frame = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT | \DEBUG_BACKTRACE_IGNORE_ARGS, 3)[2];
    if (\ReflectionProperty::class === ($scope = $frame['class'] ?? \Closure::class)) {
        $scope = $frame['object']->class;
    }
    if (null === $readonlyScope && '*' === $k[1] && ($class === $scope || is_subclass_of($class, $scope) && !isset($propertyScopes["\x00{$scope}\x00{$property}"]))) {
        return null;
    }
    return $scope;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal