當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Song::setSong方法代碼示例

本文整理匯總了PHP中Song::setSong方法的典型用法代碼示例。如果您正苦於以下問題:PHP Song::setSong方法的具體用法?PHP Song::setSong怎麽用?PHP Song::setSong使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Song的用法示例。


在下文中一共展示了Song::setSong方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getSongs

 public function getSongs($status)
 {
     if ($status == 'all') {
         $songs = AGDO::getInstance()->GetAll("SELECT * FROM SVsongs LEFT OUTER JOIN sv_song_genres ON g_id = website ORDER BY title");
     } elseif ($status == 'repertoire') {
         $songs = AGDO::getInstance()->GetAll("SELECT * FROM SVsongs LEFT OUTER JOIN sv_song_genres ON g_id = website WHERE probe != 1 AND probe != 5 ORDER BY title");
     } elseif ($status == 'uebrige') {
         $songs = AGDO::getInstance()->GetAll("SELECT * FROM SVsongs LEFT OUTER JOIN sv_song_genres ON g_id = website WHERE probe != 1 AND probe != 5 ORDER BY g_id,  title");
     } elseif ($status == 'erschienen') {
         $songs = AGDO::getInstance()->GetAll("SELECT * FROM SVsongs LEFT OUTER JOIN sv_song_genres ON g_id = website  ORDER BY erschienen DESC");
     } elseif ($status == 2) {
         $dringend = AGDO::getInstance()->GetAll("SELECT * FROM SVsongs LEFT OUTER JOIN sv_song_genres ON g_id = website WHERE probe = 3 ORDER BY title");
         $proben = AGDO::getInstance()->GetAll("SELECT * FROM SVsongs LEFT OUTER JOIN sv_song_genres ON g_id = website WHERE probe = 2 ORDER BY title");
         $sonstige = AGDO::getInstance()->GetAll("SELECT * FROM SVsongs LEFT OUTER JOIN sv_song_genres ON g_id = website WHERE probe = 4 ORDER BY letzteProbe");
         $songs = array_merge($dringend, $proben, $sonstige);
     } elseif ($status == 5) {
         $songs = AGDO::getInstance()->GetAll("SELECT * FROM SVsongs LEFT OUTER JOIN sv_song_genres ON g_id = website WHERE\n                    angefangen > '" . date("Y-m-d", time() - 3600 * 24 * 21) . "' OR probe = '5' ORDER BY angefangen DESC");
     } else {
         $songs = AGDO::getInstance()->GetAll("SELECT * FROM SVsongs LEFT OUTER JOIN sv_song_genres ON g_id = website WHERE probe = '" . $status . "' ORDER BY title");
     }
     foreach ($songs as $song) {
         $song['b'] = $song['c'];
         $song['arr_b'] = $song['arr_c'];
         $song['arr_t'] = '';
         $song['arr_p'] = '';
         $S = new Song();
         $S->setSong($song);
         $this->songs[$song['id']] = $S;
     }
     return $this->songs;
 }
開發者ID:hlag,項目名稱:svs,代碼行數:31,代碼來源:Liste.php

示例2: setSong

 public function setSong($song)
 {
     parent::setSong($song);
     $this->ps_id = $song['ps_id'];
     $this->pl_id = $song['pl_id'];
     $this->pb_id = $song['pb_id'];
     $this->pl_datum = $song['pl_datum'];
     $this->setPlayedButton();
 }
開發者ID:hlag,項目名稱:svs,代碼行數:9,代碼來源:playlistSongs.php


注:本文中的Song::setSong方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。