0 follower

Final Class Yiisoft\Hydrator\Attribute\Parameter\ToDateTime

InheritanceYiisoft\Hydrator\Attribute\Parameter\ToDateTime
ImplementsYiisoft\Hydrator\Attribute\Parameter\ParameterAttributeInterface

Converts the resolved value to DateTimeImmutable object. Non-resolved and invalid values are skipped.

Psalm Types

Name Value
IntlDateFormatterFormat \IntlDateFormatter::FULL|\IntlDateFormatter::LONG|\IntlDateFormatter::MEDIUM|\IntlDateFormatter::SHORT|\IntlDateFormatter::NONE

Property Details

Hide inherited properties

$dateType public property
public integer|null $dateType null
$format public property
public string|null $format null
$locale public property
public string|null $locale null
$timeType public property
public integer|null $timeType null
$timeZone public property
public string|null $timeZone null

Method Details

Hide inherited methods

__construct() public method

public __construct( string|null $format null, integer|null $dateType null, integer|null $timeType null, string|null $timeZone null, string|null $locale null ): mixed
$format string|null
$dateType integer|null
$timeType integer|null
$timeZone string|null
$locale string|null

                public function __construct(
    public readonly ?string $format = null,
    public readonly ?int $dateType = null,
    public readonly ?int $timeType = null,
    public readonly ?string $timeZone = null,
    public readonly ?string $locale = null,
) {}

            
getResolver() public method

public getResolver( ): string

                public function getResolver(): string
{
    return ToDateTimeResolver::class;
}