class DateTimeInterfaceTransformer implements Transformer

Properties

protected string $format
protected DateTimeZone|null $timeZone

Methods

__construct(string|null $format = null, string|null $setTimeZone = null)

Create a date transformer.

mixed
transform(DataProperty $property, mixed $value, TransformationContext $context)

Transform a date value.

Details

at line 24
__construct(string|null $format = null, string|null $setTimeZone = null)

Create a date transformer.

Parameters

string|null $format
string|null $setTimeZone

at line 42
mixed transform(DataProperty $property, mixed $value, TransformationContext $context)

Transform a date value.

Parameters

DataProperty $property
mixed $value
TransformationContext $context

Return Value

mixed