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

Breadcrumb

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

function SymfonyCaster::castRequest

File

vendor/symfony/var-dumper/Caster/SymfonyCaster.php, line 34

Class

SymfonyCaster
@final

Namespace

Symfony\Component\VarDumper\Caster

Code

public static function castRequest(Request $request, array $a, Stub $stub, bool $isNested) : array {
    $clone = null;
    foreach (self::REQUEST_GETTERS as $prop => $getter) {
        $key = Caster::PREFIX_PROTECTED . $prop;
        if (\array_key_exists($key, $a) && null === $a[$key]) {
            $clone ??= clone $request;
            $a[Caster::PREFIX_VIRTUAL . $prop] = $clone->{$getter}();
        }
    }
    return $a;
}

API Navigation

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