ID = sprintf($this->feedUrl . $item->id); $itemObject->Title = $item->title; if ($item->subtitle) { $itemObject->Title .= ' | ' . $item->subtitle; } $itemObject->Time = $item->post_date; $itemObject->Text = $item->truncated_body_text; $itemObject->Link = $item->canonical_url; $itemObject->Author = $item->publishedBylines[0]->name; $items[] = $itemObject; } return $items; } public function title() { $cacheFile = sprintf($this->_getCachePath() . '.title', $this->_feed); if (!file_exists($cacheFile)) { $this->_fetchItems(); } if ($this->_feedJson) { $title = $this->_feedJson[0]->publishedBylines[0]->publicationUsers[0]->publication->name; file_put_contents($cacheFile, $title); return $title; } else { return file_get_contents($cacheFile); } } } ?>