示例#1
0
 private function hydrateRecord(array $row)
 {
     $feed = new Record();
     $feed->setId($row['id']);
     $feed->setTitle($row['title']);
     $feed->setContent($row['content']);
     $feed->setPicture($row['picture']);
     $feed->setAuthor($row['author']);
     $feed->setLink($row['link']);
     $feed->setGuid($row['guid']);
     $feed->setPublicationDate(new \DateTime($row['publication_date']));
     $feed->setTags(json_decode($row['tags'], true));
     return $feed;
 }
示例#2
0
文件: Atom.php 项目: biozshock/rss
 private function setContent(\DOMElement $node, Record $item)
 {
     $item->setContent($this->getNodeValueByTagName($node, 'content') ?: $this->getNodeValueByTagName($node, 'summary'));
 }