/** * returns the content of this item * * @return string content */ public function getContent() { $contentFromReadability = $this->fetchFromReadability(parent::getLink()); if ($contentFromReadability === false) { return "readability parse error <br />" . parent::getContent(); } return $contentFromReadability; }
/** * returns the content of this item * * @return string content */ public function getContent() { $contentFromInstapaper = $this->fetchFromInstapaper(parent::getLink()); if ($contentFromInstapaper === false) { return "instapaper parse error <br />" . parent::getContent(); } return $contentFromInstapaper; }
/** * returns the content of this item * * @return string content */ public function getContent() { $url = parent::getLink(); \F3::get('logger')->log($this->tag . ' - Loading page: ' . $url, \INFO); $content = $this->fetchFromWebSite($url); if ($content === false) { \F3::get('logger')->log($this->tag . ' - Failed loading page', \ERROR); return parent::getContent() . "<p><strong>Failed to get web page</strong></p>"; } \F3::get('logger')->log($this->tag . ' - Extracting content', \INFO); $content = @$this->extractContent($content, parent::getLink()); if ($content === false) { \F3::get('logger')->log($this->tag . ' - Failed extracting content', \ERROR); return parent::getContent() . "<p><strong>Full Text RSS extracting error</strong></p>"; } \F3::get('logger')->log($this->tag . ' - Cleaning content', \INFO); $content = $this->cleanContent($content); if ($content === false) { \F3::get('logger')->log($this->tag . ' - Failed cleaning content from', \ERROR); return parent::getContent() . "<p><strong>Full Text RSS cleaning error</strong></p>"; } return $content; }