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

Breadcrumb

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

function StubCaster::castStub

File

vendor/symfony/var-dumper/Caster/StubCaster.php, line 25

Class

StubCaster
Casts a caster's Stub.

Namespace

Symfony\Component\VarDumper\Caster

Code

public static function castStub(Stub $c, array $a, Stub $stub, bool $isNested) : array {
    if ($isNested) {
        $stub->type = $c->type;
        $stub->class = $c->class;
        $stub->value = $c->value;
        $stub->handle = $c->handle;
        $stub->cut = $c->cut;
        $stub->attr = $c->attr;
        if (Stub::TYPE_REF === $c->type && !$c->class && \is_string($c->value) && !preg_match('//u', $c->value)) {
            $stub->type = Stub::TYPE_STRING;
            $stub->class = Stub::STRING_BINARY;
        }
        $a = [];
    }
    return $a;
}

API Navigation

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