UuidBuilder
in package
implements
UuidBuilderInterface
Nonstandard\UuidBuilder builds instances of Nonstandard\Uuid
Tags
Interfaces, Classes, Traits and Enums
- UuidBuilderInterface
- A UUID builder builds instances of UuidInterface
Table of Contents
- $numberConverter : NumberConverterInterface
- $timeConverter : TimeConverterInterface
- __construct() : mixed
- build() : Uuid
- Builds and returns a Nonstandard\Uuid
- buildFields() : Fields
- Proxy method to allow injecting a mock, for testing
Properties
$numberConverter
private
NumberConverterInterface
$numberConverter
$timeConverter
private
TimeConverterInterface
$timeConverter
Methods
__construct()
public
__construct(NumberConverterInterface $numberConverter, TimeConverterInterface $timeConverter) : mixed
Parameters
- $numberConverter : NumberConverterInterface
-
The number converter to use when constructing the Nonstandard\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 Nonstandard\Uuid
public
build(CodecInterface $codec, string $bytes) : Uuid
Parameters
- $codec : CodecInterface
-
The codec to use for building this instance
- $bytes : string
-
The byte string from which to construct a UUID
Tags
Return values
Uuid —The Nonstandard\UuidBuilder returns an instance of Nonstandard\Uuid
buildFields()
Proxy method to allow injecting a mock, for testing
protected
buildFields(string $bytes) : Fields
Parameters
- $bytes : string