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

Breadcrumb

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

function StringCodec::decodeBytes

Overrides CodecInterface::decodeBytes

2 calls to StringCodec::decodeBytes()
OrderedTimeCodec::decodeBytes in vendor/ramsey/uuid/src/Codec/OrderedTimeCodec.php
Returns a UuidInterface derived from an ordered-time binary string representation
OrderedTimeCodec::decodeBytes in vendor/ramsey/uuid/src/Codec/OrderedTimeCodec.php
Returns a UuidInterface derived from an ordered-time binary string representation
3 methods override StringCodec::decodeBytes()
GuidStringCodec::decodeBytes in vendor/ramsey/uuid/src/Codec/GuidStringCodec.php
Returns a UuidInterface derived from a binary string representation
OrderedTimeCodec::decodeBytes in vendor/ramsey/uuid/src/Codec/OrderedTimeCodec.php
Returns a UuidInterface derived from an ordered-time binary string representation
TimestampFirstCombCodec::decodeBytes in vendor/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php
Returns a UuidInterface derived from a binary string representation

File

vendor/ramsey/uuid/src/Codec/StringCodec.php, line 85

Class

StringCodec
StringCodec encodes and decodes RFC 4122 UUIDs

Namespace

Ramsey\Uuid\Codec

Code

public function decodeBytes(string $bytes) : UuidInterface {
    if (strlen($bytes) !== 16) {
        throw new InvalidArgumentException('$bytes string should contain 16 characters.');
    }
    return $this->builder
        ->build($this, $bytes);
}

API Navigation

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