public function index() { $twitch = Twitch::find_all('', 'twitch.position ASC'); $this->assign('twitch', $twitch); $this->title = 'Twitch Channels'; $this->render('twitch/index.tpl'); }
public function coverage($permalink = null) { $event = self::load_event($permalink); $this->assign('event', $event); $this->assignLayout('cEvent', $event); $slideshow = Slideshow::find(null, "slideshows.created_at DESC", true, 5); $this->assign("slideshow", $slideshow); $news = News::find_published('', "news.publish_at DESC", true, 5); $this->assign('news', $news); $matches = EventContent::find_by_permalink($event, 'matchfeed', false); $this->assign('matches', $matches); $twitch = Twitch::find_all('twitch.public = 1', 'twitch.position ASC'); $activeTwitch = Twitch::getActive(); $this->assignLayout('twitch', $twitch); $this->assignLayout('activetwitch', $activeTwitch); $this->layout = 'coverage2'; $this->title = "{$event->name} :: Coverage"; $this->render('event/coverage2.tpl'); }
public static function process($script) { $twitch = Twitch::find_all(); foreach ($twitch as $stream) { echo "Updating [{$stream}] {$stream->channel}"; $stream->update(); } }