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

Breadcrumb

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

function TraceableSerializer::deserialize

Overrides SerializerInterface::deserialize

File

vendor/symfony/serializer/Debug/TraceableSerializer.php, line 54

Class

TraceableSerializer
Collects some data about serialization.

Namespace

Symfony\Component\Serializer\Debug

Code

public function deserialize(mixed $data, string $type, string $format, array $context = []) : mixed {
    $context[self::DEBUG_TRACE_ID] = $traceId = bin2hex(random_bytes(4));
    $startTime = microtime(true);
    $result = $this->serializer
        ->deserialize($data, $type, $format, $context);
    $time = microtime(true) - $startTime;
    $caller = $this->getCaller(__FUNCTION__, SerializerInterface::class);
    $this->dataCollector
        ->collectDeserialize($traceId, $data, $type, $format, $context, $time, $caller, $this->serializerName);
    return $result;
}

API Navigation

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