public function DateTimeFormatterStrategy::extract in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/zendframework/zend-hydrator/src/Strategy/DateTimeFormatterStrategy.php \Zend\Hydrator\Strategy\DateTimeFormatterStrategy::extract()
Converts to date time string
Parameters
mixed|DateTime $value:
Return value
mixed|string
Overrides StrategyInterface::extract
File
- vendor/
zendframework/ zend-hydrator/ src/ Strategy/ DateTimeFormatterStrategy.php, line 48
Class
Namespace
Zend\Hydrator\StrategyCode
public function extract($value) {
if ($value instanceof DateTime) {
return $value
->format($this->format);
}
return $value;
}