本文整理匯總了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;
}