本文整理汇总了PHP中Browse::store方法的典型用法代码示例。如果您正苦于以下问题:PHP Browse::store方法的具体用法?PHP Browse::store怎么用?PHP Browse::store使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Browse
的用法示例。
在下文中一共展示了Browse::store方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: xoutput_from_array
$limit = $browse->get_offset();
if ($limit > 0 && $value > 0) {
$total = $browse->get_total();
$pages = ceil($total / $limit);
if ($value <= $pages) {
$offset = ($value - 1) * $limit;
$browse->set_start($offset);
}
}
break;
}
ob_start();
$browse->show_objects(null, $argument);
$results[$browse->get_content_div()] = ob_get_clean();
break;
case 'get_share_links':
$object_type = $_REQUEST['object_type'];
$object_id = intval($_REQUEST['object_id']);
if (Core::is_library_item($object_type) && $object_id > 0) {
Share::display_ui_links($object_type, $object_id);
exit;
}
break;
default:
$results['rfc3514'] = '0x1';
break;
}
// switch on action;
$browse->store();
// We always do this
echo xoutput_from_array($results);
示例2: isset
break;
case 'tag':
//FIXME: This whole thing is ugly, even though it works.
$browse->set_sort('count', 'ASC');
// This one's a doozy
$browse_type = isset($_REQUEST['type']) ? $_REQUEST['type'] : 'artist';
$browse->set_simple_browse(false);
$browse->save_objects(Tag::get_tags($browse_type, 0, 'name'));
// Should add a pager?
$object_ids = $browse->get_saved();
$keys = array_keys($object_ids);
Tag::build_cache($keys);
UI::show_box_top(T_('Tag Cloud'), 'box box_tag_cloud');
$browse2 = new Browse();
$browse2->set_type($browse_type);
$browse2->store();
require_once AmpConfig::get('prefix') . UI::find_template('show_tagcloud.inc.php');
UI::show_box_bottom();
$type = $browse2->get_type();
require_once AmpConfig::get('prefix') . UI::find_template('browse_content.inc.php');
break;
case 'artist':
$browse->set_filter('catalog', $_SESSION['catalog']);
if (AmpConfig::get('catalog_disable')) {
$browse->set_filter('catalog_enabled', '1');
}
$browse->set_sort('name', 'ASC');
$browse->update_browse_from_session();
$browse->show_objects();
break;
case 'song':