本文整理汇总了PHP中Playlist::load方法的典型用法代码示例。如果您正苦于以下问题:PHP Playlist::load方法的具体用法?PHP Playlist::load怎么用?PHP Playlist::load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Playlist
的用法示例。
在下文中一共展示了Playlist::load方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action_display
public function action_display()
{
$user = $this->is_logged();
if ($user === false) {
return Redirect::to_action('login');
} else {
$id_playlist = URI::segment(3);
$adminPlaylist = new adminPlaylist($user->get_id_user_lif(), $id_playlist);
if ($adminPlaylist->check_exists() == 1) {
$song_array = array();
$all = SongPlaylist::all_from_ids($id_playlist);
foreach ($all as $value) {
$song = new Song($value->id_song);
$song->load();
array_push($song_array, $song);
}
$playlist = new Playlist($id_playlist);
$playlist->load();
return View::make('playlist.display')->with('playlist', $playlist)->with('songs', $song_array);
} else {
return Redirect::to_action('home@index');
}
}
}
示例2: getXMLPlaylist
function getXMLPlaylist($playlistid)
{
$userid = $this->session->userdata('userid');
//header("Content-Type: application/xspf+xml");
try {
if ($userid !== FALSE && ($pl = Playlist::load($playlistid))) {
$xml = '<?xml version="1.0" encoding="UTF-8"?><playlist version="1" xmlns="http://xspf.org/ns/0/">';
$xml .= '<trackList>';
$result = $pl->getTracks($userid, 0, -1);
//do NOT paginate
foreach ($result['tracks'] as $track) {
$xml .= "<track><title>{$track->getName()}</title>\r\n <location>" . site_url("trackmanager/play/" . $track->getId() . "/" . $track->getAlbum()->getId() . "/.mp3") . "</location>\r\n <identifier>{$track->getId()}</identifier>\r\n </track>";
}
$xml .= '</trackList></playlist>';
echo $xml;
} else {
set_status_header(400);
}
} catch (Exception $e) {
set_status_header(500);
}
}
示例3: dirname
<?php
/**
* Converts svtrapport.se flash player feeds into XSPF playlists
*
* XSPF playlists are known to be compatible with: VLC, Totem
*/
namespace cd;
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/../core/');
require_once 'io_newsfeed.php';
require_once 'io_playlist.php';
require_once 'Cache.php';
$url = 'xxx/webtv/playrapport.php?format=xspf';
$url = 'http://media.svt.se/download/mcc/vision/kluster/20091021/PG-1133804-003A-BOOMSHAKALACK2-02.asx';
$pl = new Playlist();
$pl->load($url);
echo $pl->render('m3u');