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

Breadcrumb

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

function SerializableFieldsTrait::unserialize

Constructs the object from a serialized string representation

@psalm-suppress UnusedMethodCall

Parameters

string $data The serialized string representation of the object:

1 call to SerializableFieldsTrait::unserialize()
SerializableFieldsTrait::__unserialize in vendor/ramsey/uuid/src/Fields/SerializableFieldsTrait.php
@psalm-suppress UnusedMethodCall

File

vendor/ramsey/uuid/src/Fields/SerializableFieldsTrait.php, line 63

Class

SerializableFieldsTrait
Provides common serialization functionality to fields

Namespace

Ramsey\Uuid\Fields

Code

public function unserialize(string $data) : void {
    if (strlen($data) === 16) {
        $this->__construct($data);
    }
    else {
        $this->__construct(base64_decode($data));
    }
}

API Navigation

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