Class DateTimeFormatterStrategy

Summary

Fully Qualified Name: Laminas\Hydrator\Strategy\DateTimeFormatterStrategy
Implements: StrategyInterface

Description

Methods

Name Description Defined By
__construct() DateTimeFormatterStrategy
extract() {@inheritDoc} DateTimeFormatterStrategy
hydrate() Converts date time string to DateTime instance for injecting to object DateTimeFormatterStrategy

Method Details

__construct()

Parameter Name Type Description
$dateTimeFallback bool try
$format
$timezone

Returns:

extract()

{@inheritDoc}

Converts to date time string

Parameter Name Type Description
$value mixed|\DateTimeInterface
$object

Returns: mixed|string If a non-DateTimeInterface $value is provided, it will be returned unmodified; otherwise, it will be extracted to a string.

hydrate()

Converts date time string to DateTime instance for injecting to object

{@inheritDoc}

Parameter Name Type Description
$value mixed|string
$data

Returns: mixed|\DateTimeInterface

Top