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


PHP Playlist::getUsersPlaylists方法代码示例

本文整理汇总了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");
 }
开发者ID:bennetimo,项目名称:comp3013,代码行数:10,代码来源:register.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);
 }
开发者ID:bennetimo,项目名称:comp3013,代码行数:15,代码来源:playlistmanager.php

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


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