public function Feed::getDateModified in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Feed.php \Zend\Feed\Reader\Extension\Atom\Feed::getDateModified()
Get the feed modification date
Return value
DateTime|null
File
- vendor/
zendframework/ zend-feed/ src/ Reader/ Extension/ Atom/ Feed.php, line 136
Class
Namespace
Zend\Feed\Reader\Extension\AtomCode
public function getDateModified() {
if (array_key_exists('datemodified', $this->data)) {
return $this->data['datemodified'];
}
$date = null;
if ($this
->getType() === Reader\Reader::TYPE_ATOM_03) {
$dateModified = $this->xpath
->evaluate('string(' . $this
->getXpathPrefix() . '/atom:modified)');
}
else {
$dateModified = $this->xpath
->evaluate('string(' . $this
->getXpathPrefix() . '/atom:updated)');
}
if ($dateModified) {
$date = new DateTime($dateModified);
}
$this->data['datemodified'] = $date;
return $this->data['datemodified'];
}