本文整理汇总了PHP中Song::get_recently_played方法的典型用法代码示例。如果您正苦于以下问题:PHP Song::get_recently_played方法的具体用法?PHP Song::get_recently_played怎么用?PHP Song::get_recently_played使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Song
的用法示例。
在下文中一共展示了Song::get_recently_played方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_current_slideshow
public static function get_current_slideshow()
{
$songs = Song::get_recently_played($GLOBALS['user']->id);
$images = array();
if (count($songs) > 0) {
$last_song = new Song($songs[0]['object_id']);
$last_song->format();
$images = self::get_images($last_song->f_artist);
}
return $images;
}
示例2: Tmp_Playlist
</dd>
</dl><br />
<?php
UI::show_box_bottom();
UI::show_box_top(T_('Active Playlist'));
?>
<table cellspacing="0">
<tr>
<td valign="top">
<?php
$tmp_playlist = new Tmp_Playlist(Tmp_Playlist::get_from_userid($client->id));
$object_ids = $tmp_playlist->get_items();
foreach ($object_ids as $object_data) {
$type = array_shift($object_data);
$object = new $type(array_shift($object_data));
$object->format();
echo $object->f_link;
?>
<br />
<?php
}
?>
</td>
</tr>
</table><br />
<?php
UI::show_box_bottom();
$data = Song::get_recently_played($client->id);
Song::build_cache(array_keys($data));
$user_id = $client->id;
require AmpConfig::get('prefix') . '/templates/show_recently_played.inc.php';
示例3: Wanted
case 'accept_wanted':
if (AmpConfig::get('wanted') && isset($_REQUEST['mbid'])) {
$mbid = $_REQUEST['mbid'];
$walbum = new Wanted(Wanted::get_wanted($mbid));
$walbum->accept();
ob_start();
$walbum->show_action_buttons();
$results['wanted_action_' . $mbid] = ob_get_clean();
}
break;
case 'reloadnp':
ob_start();
show_now_playing();
$results['now_playing'] = ob_get_clean();
ob_start();
$data = Song::get_recently_played();
Song::build_cache(array_keys($data));
require_once AmpConfig::get('prefix') . UI::find_template('show_recently_played.inc.php');
$results['recently_played'] = ob_get_clean();
break;
case 'sidebar':
switch ($_REQUEST['button']) {
case 'home':
case 'modules':
case 'localplay':
case 'player':
case 'preferences':
$button = $_REQUEST['button'];
break;
case 'admin':
if (Access::check('interface', '100')) {
示例4: pubdate_recently_played
/**
* pubdate_recently_played
* This just returns the 'newest' recently played entry
* @return int
*/
public static function pubdate_recently_played()
{
$data = Song::get_recently_played();
$element = array_shift($data);
return $element['date'];
}