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

Breadcrumb

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

function ReflectionCaster::addExtra

3 calls to ReflectionCaster::addExtra()
ReflectionCaster::castClass in vendor/symfony/var-dumper/Caster/ReflectionCaster.php
ReflectionCaster::castFunctionAbstract in vendor/symfony/var-dumper/Caster/ReflectionCaster.php
ReflectionCaster::castProperty in vendor/symfony/var-dumper/Caster/ReflectionCaster.php

File

vendor/symfony/var-dumper/Caster/ReflectionCaster.php, line 411

Class

ReflectionCaster
Casts Reflector related classes to array representation.

Namespace

Symfony\Component\VarDumper\Caster

Code

private static function addExtra(array &$a, \Reflector $c) : void {
    $x = isset($a[Caster::PREFIX_VIRTUAL . 'extra']) ? $a[Caster::PREFIX_VIRTUAL . 'extra']->value : [];
    if (method_exists($c, 'getFileName') && ($m = $c->getFileName())) {
        $x['file'] = new LinkStub($m, $c->getStartLine());
        $x['line'] = $c->getStartLine() . ' to ' . $c->getEndLine();
    }
    self::addMap($x, $c, self::EXTRA_MAP, '');
    if ($x) {
        $a[Caster::PREFIX_VIRTUAL . 'extra'] = new EnumStub($x);
    }
}

API Navigation

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