class UlidToStringTransformer implementsDataTransformerInterface

Transforms between a ULID string and a Ulid object.

Methods

mixed
transform(mixed$value)

Transforms a Ulid object into a string.

mixed
reverseTransform(mixed$value)

Transforms a ULID string into a Ulid object.

Details

mixed transform(mixed$value)

Transforms a Ulid object into a string.

Parameters

mixed $value The value in the original representation

Return Value

mixed

Exceptions

TransformationFailedException If the given value is not a Ulid object

mixed reverseTransform(mixed$value)

Transforms a ULID string into a Ulid object.

Parameters

mixed $value The value in the transformed representation

Return Value

mixed

Exceptions

TransformationFailedException If the given value is not a string, or could not be transformed