Class DateTimeFormatterStrategy

Summary

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

Description

Methods

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

Method Details

__construct()

Constructor

Parameter Name Type Description
$format string
$timezone \DateTimeZone|null

Returns:

extract()

{@inheritDoc}

Converts to date time string

Parameter Name Type Description
$value mixed|\DateTimeInterface

Returns: mixed|string

hydrate()

Converts date time string to DateTime instance for injecting to object

{@inheritDoc}

Parameter Name Type Description
$value mixed|string

Returns: mixed|\DateTime

Top