WeekToArrayTransformer
in package
implements
DataTransformerInterface
Transforms between an ISO 8601 week date string and an array.
Tags
Interfaces, Classes, Traits and Enums
- DataTransformerInterface
- Transforms a value between different representations.
Table of Contents
- reverseTransform() : string|null
- Transforms an array into a week date string.
- transform() : array<string|int, mixed>
- Transforms a string containing an ISO 8601 week date into an array.
Methods
reverseTransform()
Transforms an array into a week date string.
public
reverseTransform(array<string|int, mixed> $value) : string|null
Parameters
- $value : array<string|int, mixed>
-
An array containing a year and a week number
Tags
Return values
string|null —A week date string following the format Y-\WW
transform()
Transforms a string containing an ISO 8601 week date into an array.
public
transform(string|null $value) : array<string|int, mixed>
Parameters
- $value : string|null
-
A week date string
Tags
Return values
array<string|int, mixed> —A value containing year and week