_feedGroup = $feed; $this->_groupConfig = json_decode(file_get_contents('../config/beer.json'), TRUE); } protected function _getCachePath() { return '../cache/beer.%s'; } protected function _fetchItems() { $data = []; foreach ($this->_groupConfig[$this->_feedGroup] as $feed) { $this->_feed = $feed; $data = array_merge($data, parent::_fetchItems()); } $this->_feed = $this->_feedGroup; return $data; } protected function _sortContent($content) { usort($content, function($c1, $c2) { return $c2->Time - $c1->Time; }); return $content; } public function title() { return sprintf("Beer Facebook page posts - %s", $this->_feed); } } ?>