示例#1
0
 public static function loadNowPlaying()
 {
     Debug::startTimer('Nowplaying Overall');
     $em = self::getEntityManager();
     $stations = Station::fetchAll();
     $nowplaying = array('legacy' => array(), 'api' => array());
     foreach ($stations as $station) {
         Debug::startTimer($station->name);
         $name = $station->short_name;
         $nowplaying['api'][$name] = self::processStation($station);
         $nowplaying['legacy'][$name] = self::processLegacy($nowplaying['api'][$name]);
         Debug::endTimer($station->name);
         Debug::divider();
     }
     Debug::endTimer('Nowplaying Overall');
     return $nowplaying;
 }