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