UuidBuilder
in package
implements
UuidBuilderInterface
UuidBuilder builds instances of RFC 4122 UUIDs
Tags
Interfaces, Classes, Traits and Enums
- UuidBuilderInterface
- A UUID builder builds instances of UuidInterface
Table of Contents
- $numberConverter : NumberConverterInterface
- $timeConverter : TimeConverterInterface
- __construct() : mixed
- Constructs the DefaultUuidBuilder
- build() : UuidInterface
- Builds and returns a Uuid
- buildFields() : FieldsInterface
- Proxy method to allow injecting a mock, for testing
Properties
$numberConverter
private
NumberConverterInterface
$numberConverter
$timeConverter
private
TimeConverterInterface
$timeConverter
Methods
__construct()
Constructs the DefaultUuidBuilder
public
__construct(NumberConverterInterface $numberConverter, TimeConverterInterface $timeConverter) : mixed
Parameters
- $numberConverter : NumberConverterInterface
-
The number converter to use when constructing the Uuid
- $timeConverter : TimeConverterInterface
-
The time converter to use for converting timestamps extracted from a UUID to Unix timestamps
Return values
mixed —build()
Builds and returns a Uuid
public
build(CodecInterface $codec, string $bytes) : UuidInterface
Parameters
- $codec : CodecInterface
-
The codec to use for building this Uuid instance
- $bytes : string
-
The byte string from which to construct a UUID
Tags
Return values
UuidInterface —UuidBuilder returns instances of Rfc4122UuidInterface
buildFields()
Proxy method to allow injecting a mock, for testing
protected
buildFields(string $bytes) : FieldsInterface
Parameters
- $bytes : string