当前位置: 首页>>代码示例>>PHP>>正文


PHP Playlist::load方法代码示例

本文整理汇总了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');
         }
     }
 }
开发者ID:laiello,项目名称:atm-music,代码行数:24,代码来源:playlist.php

示例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);
     }
 }
开发者ID:bennetimo,项目名称:comp3013,代码行数:22,代码来源:playlistmanager.php

示例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');
开发者ID:martinlindhe,项目名称:core_dev,代码行数:18,代码来源:test.io_playlist.php


注:本文中的Playlist::load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。