url = $url; $this->cache = Cache::getLazyCache(); } public function showDescription($bool) { $this->showDescription = $bool; } public function showContent($bool) { $this->showContent = $bool; } public function setCountPosts($count) { $this->count = $count; } public function get() { $cacheId = 'RSS_' . md5($this->url); $output = $this->cache->fetch($cacheId); if (!$output) { try { $content = Http::fetchRemoteFile($this->url); $rss = simplexml_load_string($content); } catch (\Exception $e) { throw new \Exception("Error while importing feed: {$e->getMessage()}\n"); } $output = '