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

Breadcrumb

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

function FFICaster::castFFIPointer

File

vendor/symfony/var-dumper/Caster/FFICaster.php, line 100

Class

FFICaster
Casts FFI extension classes to array representation.

Namespace

Symfony\Component\VarDumper\Caster

Code

private static function castFFIPointer(Stub $stub, CType $type, ?CData $data = null) : array {
    $ptr = $type->getPointerType();
    if (null === $data) {
        return [
            Caster::PREFIX_VIRTUAL . '0' => $ptr,
        ];
    }
    return match ($ptr->getKind()) {    CType::TYPE_CHAR => [
            Caster::PREFIX_VIRTUAL . 'cdata' => self::castFFIStringValue($data),
        ],
        CType::TYPE_FUNC => self::castFFIFunction($stub, $ptr),
        default => [
            Caster::PREFIX_VIRTUAL . 'cdata' => $data[0],
        ],
    
    };
}

API Navigation

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