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


PHP Playlist::get_song_count方法代碼示例

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


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

示例1: Album

     require AmpConfig::get('prefix') . '/templates/show_song_row.inc.php';
     break;
 case 'refresh_album':
     $album = new Album($_REQUEST['id']);
     $album->format();
     require AmpConfig::get('prefix') . '/templates/show_album_row.inc.php';
     break;
 case 'refresh_artist':
     $artist = new Artist($_REQUEST['id'], $_SESSION['catalog']);
     $artist->format();
     require AmpConfig::get('prefix') . '/templates/show_artist_row.inc.php';
     break;
 case 'refresh_playlist':
     $playlist = new Playlist($_REQUEST['id']);
     $playlist->format();
     $count = $playlist->get_song_count();
     require AmpConfig::get('prefix') . '/templates/show_playlist_row.inc.php';
     break;
 case 'refresh_smartplaylist':
     $playlist = new Search('song', $_REQUEST['id']);
     $playlist->format();
     require AmpConfig::get('prefix') . '/templates/show_smartplaylist_row.inc.php';
     break;
 case 'refresh_livestream':
     $radio = new Radio($_REQUEST['id']);
     $radio->format();
     require AmpConfig::get('prefix') . '/templates/show_live_stream_row.inc.php';
     break;
 case 'refresh_channel':
     $channel = new Channel($_REQUEST['id']);
     $channel->format();
開發者ID:axelsimon,項目名稱:ampache,代碼行數:31,代碼來源:refresh_updated.server.php

示例2: playlists

 /**
  * playlists
  *
  * This takes an array of playlist ids and then returns a nice pretty XML document
  *
  * @param    array    $playlists    (description here...)
  * @return    string    return xml
  */
 public static function playlists($playlists)
 {
     if (count($playlists) > self::$limit or self::$offset > 0) {
         $playlists = array_slice($playlists, self::$offset, self::$limit);
     }
     $string = '';
     // Foreach the playlist ids
     foreach ($playlists as $playlist_id) {
         $playlist = new Playlist($playlist_id);
         $playlist->format();
         $item_total = $playlist->get_song_count();
         // Build this element
         $string .= "<playlist id=\"{$playlist->id}\">\n" . "\t<name><![CDATA[{$playlist->name}]]></name>\n" . "\t<owner><![CDATA[{$playlist->f_user}]]></owner>\n" . "\t<items>{$item_total}</items>\n" . "\t<type>{$playlist->type}</type>\n" . "</playlist>\n";
     }
     // end foreach
     // Build the final and then send her off
     $final = self::_header() . $string . self::_footer();
     return $final;
 }
開發者ID:cheese1,項目名稱:ampache,代碼行數:27,代碼來源:xml_data.class.php


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