GuidBuilder
GuidBuilder builds instances of Guid
- Full name:
\Ramsey\Uuid\Guid\GuidBuilder
- This class implements:
\Ramsey\Uuid\Builder\UuidBuilderInterface
See Also:
- \Ramsey\Uuid\Guid\Guid -
Properties
numberConverter
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
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
Parameters:
Parameter | Type | Description |
---|---|---|
$bytes |
string |
Automatically generated on 2025-03-18