public function chatAction() { $this->forceInsecure(); $this->_initStations(); // Pull podcasts. $podcasts = Podcast::fetchLatest(); $this->view->podcasts = $podcasts; }
public function latestAction() { try { $latest_shows = Podcast::fetchLatest(); $return = array(); foreach ((array) $latest_shows as $show_info) { $return_row = Podcast::api($show_info['record'], FALSE); foreach ((array) $show_info['episodes'] as $ep_row) { $return_row['episodes'][] = PodcastEpisode::api($ep_row); } $return[] = $return_row; } return $this->returnSuccess($return); } catch (\Exception $e) { return $this->returnError($e->getMessage()); } }