interface CodecInterface (View source)

CodecInterface represents a UUID coder-decoder

Methods

string
encode(UuidInterface $uuid)

Encodes a UuidInterface as a string representation of a UUID

string
encodeBinary(UuidInterface $uuid)

Encodes a UuidInterface as a binary representation of a UUID

decode(string $encodedUuid)

Decodes a string representation of a UUID into a UuidInterface object instance

decodeBytes(string $bytes)

Decodes a binary representation of a UUID into a UuidInterface object instance

Details

string encode(UuidInterface $uuid)

Encodes a UuidInterface as a string representation of a UUID

Parameters

UuidInterface $uuid

Return Value

string Hexadecimal string representation of a UUID

string encodeBinary(UuidInterface $uuid)

Encodes a UuidInterface as a binary representation of a UUID

Parameters

UuidInterface $uuid

Return Value

string Binary string representation of a UUID

UuidInterface decode(string $encodedUuid)

Decodes a string representation of a UUID into a UuidInterface object instance

Parameters

string $encodedUuid

Return Value

UuidInterface

UuidInterface decodeBytes(string $bytes)

Decodes a binary representation of a UUID into a UuidInterface object instance

Parameters

string $bytes

Return Value

UuidInterface