public function Entry::getDateModified in Zircon Profile 8
Same name in this branch
- 8 vendor/zendframework/zend-feed/src/Writer/Entry.php \Zend\Feed\Writer\Entry::getDateModified()
- 8 vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Entry.php \Zend\Feed\Reader\Extension\Atom\Entry::getDateModified()
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Entry.php \Zend\Feed\Reader\Extension\Atom\Entry::getDateModified()
Get the entry modification date
Return value
string
File
- vendor/
zendframework/ zend-feed/ src/ Reader/ Extension/ Atom/ Entry.php, line 189
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
->getAtomType() === Reader\Reader::TYPE_ATOM_03) {
$dateModified = $this
->getXpath()
->evaluate('string(' . $this
->getXpathPrefix() . '/atom:modified)');
}
else {
$dateModified = $this
->getXpath()
->evaluate('string(' . $this
->getXpathPrefix() . '/atom:updated)');
}
if ($dateModified) {
$date = new DateTime($dateModified);
}
$this->data['datemodified'] = $date;
return $this->data['datemodified'];
}