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

Breadcrumb

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

function LazyObjectRegistry::getClassAccessors

8 calls to LazyObjectRegistry::getClassAccessors()
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 82

Class

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

Namespace

Symfony\Component\VarExporter\Internal

Code

public static function getClassAccessors($class) {
    return \Closure::bind(static fn() => [
        'get' => static function &($instance, $name, $readonly) {
            if (!$readonly) {
                return $instance->{$name};
            }
            $value = $instance->{$name};
            return $value;
        },
        'set' => static function ($instance, $name, $value) {
            $instance->{$name} = $value;
        },
        'isset' => static fn($instance, $name) => isset($instance->{$name}),
        'unset' => static function ($instance, $name) {
            unset($instance->{$name});
        },
    ], null, \Closure::class === $class ? null : $class)();
}

API Navigation

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