Documentation

TimestampLastCombCodec extends StringCodec
in package

TimestampLastCombCodec encodes and decodes COMB UUIDs which have the timestamp as the last 48 bits.

To be used with MSSQL.

Table of Contents

$builder  : UuidBuilderInterface
__construct()  : mixed
Constructs a StringCodec for use encoding and decoding UUIDs
decode()  : UuidInterface
Decodes a string representation of a UUID into a UuidInterface object instance
decodeBytes()  : UuidInterface
Decodes a binary representation of a UUID into a UuidInterface object instance
encode()  : string
Encodes a UuidInterface as a string representation of a UUID
encodeBinary()  : string
Encodes a UuidInterface as a binary representation of a UUID
extractComponents()  : array<string|int, mixed>
Returns an array of UUID components (the UUID exploded on its dashes)
getBuilder()  : UuidBuilderInterface
Returns the UUID builder
getFields()  : array<string|int, mixed>
Returns the fields that make up this UUID

Properties

Methods

decodeBytes()

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

public decodeBytes(string $bytes) : UuidInterface
Parameters
$bytes : string
Tags
throws
InvalidArgumentException

if string has not 16 characters

Return values
UuidInterface

encode()

Encodes a UuidInterface as a string representation of a UUID

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

Hexadecimal string representation of a UUID

encodeBinary()

Encodes a UuidInterface as a binary representation of a UUID

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

Binary string representation of a UUID

extractComponents()

Returns an array of UUID components (the UUID exploded on its dashes)

protected extractComponents(string $encodedUuid) : array<string|int, mixed>
Parameters
$encodedUuid : string
Tags
throws
InvalidUuidStringException
Return values
array<string|int, mixed>

getFields()

Returns the fields that make up this UUID

protected getFields(array<string|int, mixed> $components) : array<string|int, mixed>
Parameters
$components : array<string|int, mixed>
Tags
see
UuidInterface::getFieldsHex()
Return values
array<string|int, mixed>

Search results