當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。