本文整理汇总了PHP中C_Router::_instances方法的典型用法代码示例。如果您正苦于以下问题:PHP C_Router::_instances方法的具体用法?PHP C_Router::_instances怎么用?PHP C_Router::_instances使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类C_Router
的用法示例。
在下文中一共展示了C_Router::_instances方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
function render_displayed_gallery_action()
{
$retval = array();
// this must run ONLY twice
if (isset($_POST['ajax_referrer']) && $this->_run_count <= 1) {
// set the router & routed app to use the uri provided in ajax_referrer
$parsed_url = parse_url($_POST['ajax_referrer']);
$url = $parsed_url['path'];
if (!empty($parsed_url['query'])) {
$url .= '?' . $parsed_url['query'];
}
$_SERVER['REQUEST_URI'] = $url;
$_SERVER['PATH_INFO'] = $parsed_url['path'];
$this->_run_count++;
C_Router::$_instances = array();
$router = C_Router::get_instance();
$router->serve_request();
}
if (isset($_POST['displayed_gallery_id'])) {
$displayed_gallery = new C_Displayed_Gallery();
$displayed_gallery->apply_transient($_POST['displayed_gallery_id']);
$renderer = C_Displayed_Gallery_Renderer::get_instance();
$retval['html'] = $renderer->render($displayed_gallery, TRUE);
}
return $retval;
}