本文整理汇总了PHP中Playlist::getUsersPlaylists方法的典型用法代码示例。如果您正苦于以下问题:PHP Playlist::getUsersPlaylists方法的具体用法?PHP Playlist::getUsersPlaylists怎么用?PHP Playlist::getUsersPlaylists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Playlist
的用法示例。
在下文中一共展示了Playlist::getUsersPlaylists方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
function index()
{
$userid = $this->session->userdata('userid');
$this->load->static_model('Playlist');
$playlists = Playlist::getUsersPlaylists($userid);
$data = array('userid' => $userid, 'user' => $userid ? new User($userid) : NULL, 'playlists' => $playlists, 'page_title' => "Register");
$this->load->view("common/header.php", $data);
$this->load->view("register/register_view.php");
$this->load->view("common/footer.php");
}
示例2: get_user_playlists
function get_user_playlists()
{
$userid = $this->session->userdata('userid');
if (!$userid) {
throw new Exception("User must be logged in to access her playlist.");
}
$playlists = Playlist::getUsersPlaylists($userid);
$newPlaylists = array();
foreach ($playlists as $playlist) {
$pl = $playlist->toArray(FALSE);
$pl['read_only'] = $userid != $playlist->getOwnerId();
$newPlaylists[] = $pl;
}
echo json_encode($newPlaylists);
}
示例3: index
function index()
{
$userid = $this->session->userdata('userid');
$playlists = null;
$user = null;
if ($userid) {
$this->load->static_model('Playlist');
$playlists = Playlist::getUsersPlaylists($userid);
$user = new User($userid);
}
$data = array('userid' => $userid, 'user' => $user, 'playlists' => $playlists, 'page_title' => "Welcome.");
$this->load->view("common/header.php", $data);
$this->load->view("register/activation_confirmation_view.php");
$this->load->view("common/footer.php");
}
示例4: topUp
function topUp()
{
$userid = $this->session->userdata('userid');
if ($userid == null) {
redirect("/main");
}
$this->load->static_model('Playlist');
$playlists = Playlist::getUsersPlaylists($userid);
$user = new User($userid);
$first_name = $user->getFName();
$last_name = $user->getLName();
$joined = $user->getJoined();
$email = $user->getEmail();
$credit = $user->getCredit();
$data = array('userid' => $userid, 'user' => $user, 'first_name' => $first_name, 'last_name' => $last_name, 'email' => $email, 'joined' => $joined, 'credit' => $credit, 'page_title' => "Add Money", 'playlists' => $playlists);
$this->load->view("common/header.php", $data);
$this->load->view("account/topup_view.php", $data);
$this->load->view("common/footer.php");
}