本文整理匯總了PHP中Playlist::has_access方法的典型用法代碼示例。如果您正苦於以下問題:PHP Playlist::has_access方法的具體用法?PHP Playlist::has_access怎麽用?PHP Playlist::has_access使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Playlist
的用法示例。
在下文中一共展示了Playlist::has_access方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: switch
$browse->set_start(0);
}
ob_start();
$browse->show_objects(null, $argument);
$results[$browse->get_content_div()] = ob_get_clean();
break;
case 'toggle_tag':
$type = $_SESSION['tagcloud_type'] ? $_SESSION['tagcloud_type'] : 'song';
$browse->set_type($type);
break;
case 'delete_object':
switch ($_REQUEST['type']) {
case 'playlist':
// Check the perms we need to on this
$playlist = new Playlist($_REQUEST['id']);
if (!$playlist->has_access()) {
exit;
}
// Delete it!
$playlist->delete();
$key = 'playlist_row_' . $playlist->id;
break;
case 'smartplaylist':
$playlist = new Search($_REQUEST['id'], 'song');
if (!$playlist->has_access()) {
exit;
}
$playlist->delete();
$key = 'smartplaylist_row_' . $playlist->id;
break;
case 'live_stream':
示例2: playlist_remove_song
/**
* playlist_remove_song
* This remove a song from a playlist
*/
public static function playlist_remove_song($input)
{
ob_end_clean();
$playlist = new Playlist($input['filter']);
$track = new Playlist($input['track']);
if (!$playlist->has_access()) {
echo XML_Data::error('401', T_('Access denied to this playlist.'));
} else {
$playlist->delete_track_number($track);
echo XML_Data::single_string('success');
}
}