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; }
private function setContent(\DOMElement $node, Record $item) { $item->setContent($this->getNodeValueByTagName($node, 'content') ?: $this->getNodeValueByTagName($node, 'summary')); }