public function quick($talkStub) { $cache = $this->getCache(); $talkDb = new TalkDb($cache); $talk = $talkDb->load('stub', $talkStub); $eventDb = new EventDb($cache); $event = $eventDb->load('uri', $talk['event_uri']); if (!$event) { return \Slim\Slim::getInstance()->notFound(); } $this->application->redirect($this->application->urlFor('talk', array('eventSlug' => $event['url_friendly_name'], 'talkSlug' => $talk['slug']))); }
/** * Gets talk data from api on single talk * * @param string $talk_uri API talk uri * @param bool $verbose Return verbose data? * @return TalkEntity */ public function getTalk($talk_uri, $verbose = false) { if ($verbose) { $talk_uri = $talk_uri . '?verbose=yes'; } $collection = (array) json_decode($this->apiGet($talk_uri)); $talk = new TalkEntity($collection['talks'][0]); $this->talkDb->save($talk); foreach ($talk->getSpeakers() as $speakerInfo) { if (isset($speakerInfo->speaker_uri)) { $speakerInfo->username = $this->userApi->getUsername($speakerInfo->speaker_uri); } } return $talk; }