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

Breadcrumb

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

function Uuid::unserialize

Re-constructs the object from its serialized form

Parameters

string $data The serialized PHP string to unserialize into: a UuidInterface instance

1 call to Uuid::unserialize()
Uuid::__unserialize in vendor/ramsey/uuid/src/Uuid.php

File

vendor/ramsey/uuid/src/Uuid.php, line 313

Class

Uuid
Uuid provides constants and static methods for working with and generating UUIDs

Namespace

Ramsey\Uuid

Code

public function unserialize(string $data) : void {
    if (strlen($data) === 16) {
        
        /** @var Uuid $uuid */
        $uuid = self::getFactory()->fromBytes($data);
    }
    else {
        
        /** @var Uuid $uuid */
        $uuid = self::getFactory()->fromString($data);
    }
    $this->codec = $uuid->codec;
    $this->numberConverter = $uuid->numberConverter;
    $this->fields = $uuid->fields;
    $this->timeConverter = $uuid->timeConverter;
}

API Navigation

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