Пример #1
0
 /**
  * getAllDJProfiles
  *
  * @static
  * @access public
  * @return void
  */
 public static function getAllDJProfiles()
 {
     $shows = ShowModel::getAllShows();
     $profiles = array();
     foreach ($shows as $show) {
         foreach ($show['ShowUsers'] as $user) {
             $profiles[] = array('ShowID' => $show['ShowID'], 'UserID' => $user['UserID'], 'DJName' => $user['DJName'], 'ShowName' => $show['ShowName'], 'ShowDescription' => $show['ShowDescription'], 'ShowURL' => $show['ShowURL'], 'ShowCategory' => $show['ShowCategory']);
         }
     }
     return $profiles;
 }
Пример #2
0
 /**
  * import
  *
  * @access public
  * @return void
  */
 public function import()
 {
     $shows = ShowModel::getAllShows();
     if (count($shows) == 0) {
         throw new \Exception("Failed to retrieve all the shows from Spinitron. Check your settings.");
     }
     foreach ($shows as $show) {
         $this->createShow($show);
     }
     $profiles = ProfileModel::getAllDJProfiles();
     if (count($profiles) == 0) {
         throw new \Exception("Failed to retrieve all the DJ profiles from Spinitron. Check your settings.");
     }
     foreach ($profiles as $profile) {
         $this->createProfile($profile);
     }
 }
Пример #3
0
 public static function getCurrentShow()
 {
     $response = json_encode(ShowModel::getCurrentShow());
     echo $response;
     die;
 }