本文整理汇总了PHP中Random::get_single_song方法的典型用法代码示例。如果您正苦于以下问题:PHP Random::get_single_song方法的具体用法?PHP Random::get_single_song怎么用?PHP Random::get_single_song使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Random
的用法示例。
在下文中一共展示了Random::get_single_song方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Song
// while we've got the 'new' song in old the array
}
// end if we've got a cooldown
}
// if democratic ID passed
/**
* if we are doing random let's pull the random object
*/
if ($random) {
if ($_REQUEST['start'] < 1) {
if (isset($_REQUEST['random_type'])) {
$rtype = $_REQUEST['random_type'];
} else {
$rtype = $type;
}
$oid = Random::get_single_song($rtype);
if ($oid) {
// Save this one in case we do a seek
$_SESSION['random']['last'] = $oid;
}
} else {
$oid = $_SESSION['random']['last'];
}
}
// if random
if ($type == 'song') {
/* Base Checks passed create the song object */
$media = new Song($oid);
$media->format();
} else {
if ($type == 'song_preview') {
示例2: Song
$oid = $democratic->get_next_object($song_cool_check);
if ($song_cool_check >= '5') {
break;
}
}
// while we've got the 'new' song in old the array
}
// end if we've got a cooldown
}
// if democratic ID passed
/**
* if we are doing random let's pull the random object
*/
if ($random) {
if ($_REQUEST['start'] < 1) {
$oid = Random::get_single_song($_REQUEST['random_type']);
// Save this one in case we do a seek
$_SESSION['random']['last'] = $oid;
} else {
$oid = $_SESSION['random']['last'];
}
}
// if random
if ($type == 'song') {
/* Base Checks passed create the song object */
$media = new Song($oid);
$media->format();
} else {
if ($type == 'song_preview') {
$media = new Song_Preview($oid);
$media->format();