class WeekToArrayTransformer implementsDataTransformerInterface

Transforms between an ISO 8601 week date string and an array.

Methods

mixed
transform(mixed$value)

Transforms a string containing an ISO 8601 week date into an array.

mixed
reverseTransform(mixed$value)

Transforms an array into a week date string.

Details

mixed transform(mixed$value)

Transforms a string containing an ISO 8601 week date into an array.

Parameters

mixed $value The value in the original representation

Return Value

mixed

Exceptions

TransformationFailedException If the given value is not a string, or if the given value does not follow the right format

mixed reverseTransform(mixed$value)

Transforms an array into a week date string.

Parameters

mixed $value The value in the transformed representation

Return Value

mixed

Exceptions

TransformationFailedException If the given value cannot be merged in a valid week date string, or if the obtained week date does not exists