Documentation

CodecInterface

A codec encodes and decodes a UUID according to defined rules

Tags
psalm-immutable

Table of Contents

decode()  : UuidInterface
Returns a UuidInterface derived from a hexadecimal string representation
decodeBytes()  : UuidInterface
Returns a UuidInterface derived from a binary string representation
encode()  : string
Returns a hexadecimal string representation of a UuidInterface
encodeBinary()  : string
Returns a binary string representation of a UuidInterface

Methods

decode()

Returns a UuidInterface derived from a hexadecimal string representation

public decode(string $encodedUuid) : UuidInterface
Parameters
$encodedUuid : string

The hexadecimal string representation to convert into a UuidInterface instance

Return values
UuidInterface

An instance of a UUID decoded from a hexadecimal string representation

decodeBytes()

Returns a UuidInterface derived from a binary string representation

public decodeBytes(string $bytes) : UuidInterface
Parameters
$bytes : string

The binary string representation to convert into a UuidInterface instance

Return values
UuidInterface

An instance of a UUID decoded from a binary string representation

encode()

Returns a hexadecimal string representation of a UuidInterface

public encode(UuidInterface $uuid) : string
Parameters
$uuid : UuidInterface

The UUID for which to create a hexadecimal string representation

Tags
psalm-return

non-empty-string

Return values
string

Hexadecimal string representation of a UUID

encodeBinary()

Returns a binary string representation of a UuidInterface

public encodeBinary(UuidInterface $uuid) : string
Parameters
$uuid : UuidInterface

The UUID for which to create a binary string representation

Tags
psalm-return

non-empty-string

Return values
string

Binary string representation of a UUID

Search results