public function getFeeds() { $feeds = array(); foreach ($this->_feed_category->related('feeds.category_id') as $feed) { $file = \App\Tools\AuxFactory::getFeedFile($feed->id); $feeds[$feed->id] = simplexml_load_file($file); } return $feeds; }
/** */ public function getFeeds() { $feed_categories = $this->_database->table('categories'); $feeds = array(); foreach ($feed_categories as $category) { // first value is the category itself $feeds[$category->id][] = $category->category_cz; foreach ($category->related('feeds.category_id') as $feed) { $file = \App\Tools\AuxFactory::getFeedFile($feed->id); $feeds[$category->id][$feed->id] = simplexml_load_file($file); } } return $feeds; }
public function getFeed($feed_id) { $file = \App\Tools\AuxFactory::getFeedFile($feed_id); return simplexml_load_file($file); }