Skip to content

GuidBuilder

GuidBuilder builds instances of Guid

See Also:

  • \Ramsey\Uuid\Guid\Guid -

Properties

numberConverter

private \Ramsey\Uuid\Converter\NumberConverterInterface $numberConverter

timeConverter

private \Ramsey\Uuid\Converter\TimeConverterInterface $timeConverter

Methods

__construct

public __construct(\Ramsey\Uuid\Converter\NumberConverterInterface $numberConverter, \Ramsey\Uuid\Converter\TimeConverterInterface $timeConverter): mixed

Parameters:

Parameter Type Description
$numberConverter \Ramsey\Uuid\Converter\NumberConverterInterface The number converter to
use when constructing the Guid
$timeConverter \Ramsey\Uuid\Converter\TimeConverterInterface The time converter to use
for converting timestamps extracted from a UUID to Unix timestamps

build

Builds and returns a Guid

public build(\Ramsey\Uuid\Codec\CodecInterface $codec, string $bytes): \Ramsey\Uuid\Guid\Guid

Parameters:

Parameter Type Description
$codec \Ramsey\Uuid\Codec\CodecInterface The codec to use for building this Guid instance
$bytes string The byte string from which to construct a UUID

Return Value:

The GuidBuilder returns an instance of Ramsey\Uuid\Guid\Guid


buildFields

Proxy method to allow injecting a mock, for testing

protected buildFields(string $bytes): \Ramsey\Uuid\Guid\Fields

Parameters:

Parameter Type Description
$bytes string


Automatically generated on 2025-03-18