本文整理汇总了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');
}
}