当前位置: 首页>>代码示例>>PHP>>正文


PHP Browse::get_objects方法代码示例

本文整理汇总了PHP中Browse::get_objects方法的典型用法代码示例。如果您正苦于以下问题:PHP Browse::get_objects方法的具体用法?PHP Browse::get_objects怎么用?PHP Browse::get_objects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Browse的用法示例。


在下文中一共展示了Browse::get_objects方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: videos

 /**
  * videos
  * This returns video objects!
  * @param array $input
  */
 public static function videos($input)
 {
     self::$browse->reset_filters();
     self::$browse->set_type('video');
     self::$browse->set_sort('title', 'ASC');
     $method = $input['exact'] ? 'exact_match' : 'alpha_match';
     Api::set_filter($method, $input['filter']);
     $video_ids = self::$browse->get_objects();
     XML_Data::set_offset($input['offset']);
     XML_Data::set_limit($input['limit']);
     echo XML_Data::videos($video_ids);
 }
开发者ID:nioc,项目名称:ampache,代码行数:17,代码来源:api.class.php

示例2: Playlist

require_once '../lib/init.php';
debug_event('refresh_reordered.server.php', 'Called for action: {' . $_REQUEST['action'] . '}', '5');
/* Switch on the action passed in */
switch ($_REQUEST['action']) {
    case 'refresh_playlist_medias':
        $playlist = new Playlist($_REQUEST['id']);
        $playlist->format();
        $object_ids = $playlist->get_items();
        $browse = new Browse();
        $browse->set_type('playlist_media');
        $browse->add_supplemental_object('playlist', $playlist->id);
        $browse->set_static_content(true);
        $browse->show_objects($object_ids);
        $browse->store();
        break;
    case 'refresh_album_songs':
        $browse = new Browse();
        $browse->set_show_header(true);
        $browse->set_type('song');
        $browse->set_simple_browse(true);
        $browse->set_filter('album', $_REQUEST['id']);
        $browse->set_sort('track', 'ASC');
        $browse->get_objects();
        echo "<div id='browse_content_song' class='browse_content'>";
        $browse->show_objects(null, true);
        // true argument is set to show the reorder column
        $browse->store();
        echo "</div>";
        break;
}
// switch on the action
开发者ID:bl00m,项目名称:ampache,代码行数:31,代码来源:refresh_reordered.server.php

示例3: License

        if (isset($_POST['license_id'])) {
            $license = new License($_POST['license_id']);
            if ($license->id) {
                $license->update($_POST);
            }
            $text = T_('License Updated');
        } else {
            License::create($_POST);
            $text = T_('License Created');
        }
        show_confirmation($text, '', AmpConfig::get('web_path') . '/admin/license.php');
        break;
    case 'show_edit':
        $license = new License($_REQUEST['license_id']);
    case 'show_create':
        require_once AmpConfig::get('prefix') . '/templates/show_edit_license.inc.php';
        break;
    case 'delete':
        License::delete($_REQUEST['license_id']);
        show_confirmation(T_('License Deleted'), '', AmpConfig::get('web_path') . '/admin/license.php');
        break;
    default:
        $browse = new Browse();
        $browse->set_type('license');
        $browse->set_simple_browse(true);
        $license_ids = $browse->get_objects();
        $browse->show_objects($license_ids);
        $browse->store();
        break;
}
UI::show_footer();
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:license.php

示例4: User

            $history = $working_user->get_ip_history(0, 1);
        } else {
            $history = $working_user->get_ip_history();
        }
        require AmpConfig::get('prefix') . '/templates/show_ip_history.inc.php';
        break;
    case 'show_add_user':
        if (AmpConfig::get('demo_mode')) {
            break;
        }
        require_once AmpConfig::get('prefix') . '/templates/show_add_user.inc.php';
        break;
    case 'show_preferences':
        $client = new User($_REQUEST['user_id']);
        $preferences = Preference::get_all($client->id);
        require_once AmpConfig::get('prefix') . '/templates/show_user_preferences.inc.php';
        break;
    default:
        $browse = new Browse();
        $browse->reset_filters();
        $browse->set_type('user');
        $browse->set_simple_browse(true);
        $browse->set_sort('name', 'ASC');
        $user_ids = $browse->get_objects();
        $browse->show_objects($user_ids);
        $browse->store();
        break;
}
// end switch on action
/* Show the footer */
UI::show_footer();
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:users.php

示例5: xoutput_from_array

        $tag = new Tag($_GET['tag_id']);
        $tag->delete();
        header('Location: ' . AmpConfig::get('web_path') . '/browse.php?action=tag');
        exit;
    case 'remove_tag_map':
        debug_event('tag.ajax', 'Removing tag map...', '5');
        $tag = new Tag($_GET['tag_id']);
        $tag->remove_map($_GET['type'], $_GET['object_id']);
        break;
    case 'browse_type':
        $browse = new Browse($_GET['browse_id']);
        $browse->set_filter('object_type', $_GET['type']);
        $browse->store();
        break;
    case 'add_filter':
        $browse = new Browse($_GET['browse_id']);
        $browse->set_filter('tag', $_GET['tag_id']);
        $object_ids = $browse->get_objects();
        ob_start();
        $browse->show_objects($object_ids);
        $results[$browse->get_content_div()] = ob_get_clean();
        $browse->store();
        // Retrieve current objects of type based on combined filters
        break;
    default:
        $results['rfc3514'] = '0x1';
        break;
}
// switch on action;
// We always do this
echo xoutput_from_array($results);
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:tag.ajax.php

示例6: Shoutbox

switch ($_REQUEST['action']) {
    case 'edit_shout':
        $shout = new Shoutbox($_REQUEST['shout_id']);
        if ($shout->id) {
            $shout->update($_POST);
        }
        show_confirmation(T_('Shoutbox Post Updated'), '', AmpConfig::get('web_path') . '/admin/shout.php');
        break;
    case 'show_edit':
        $shout = new Shoutbox($_REQUEST['shout_id']);
        $object = Shoutbox::get_object($shout->object_type, $shout->object_id);
        $object->format();
        $client = new User($shout->user);
        $client->format();
        require_once AmpConfig::get('prefix') . '/templates/show_edit_shout.inc.php';
        break;
    case 'delete':
        Shoutbox::delete($_REQUEST['shout_id']);
        show_confirmation(T_('Shoutbox Post Deleted'), '', AmpConfig::get('web_path') . '/admin/shout.php');
        break;
    default:
        $browse = new Browse();
        $browse->set_type('shoutbox');
        $browse->set_simple_browse(true);
        $shoutbox_ids = $browse->get_objects();
        $browse->show_objects($shoutbox_ids);
        $browse->store();
        break;
}
// end switch on action
UI::show_footer();
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:shout.php


注:本文中的Browse::get_objects方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。