Example #1
0
//	Generate dispatch file path.
$dispatch = $app_root . $url;
//	Generate route table.
/*
$route['alias']		 = $is_alias;
$route['rewrite_base'] = $rewrite_base; // TODO: Toolbox::GetRewriteBase();
$route['meta_path']	 = $_SERVER['DOCUMENT_ROOT'].$request_uri;
$route['file_name']	 = $file_name;
*/
$route = array();
$route['app_root'] = $app_root;
$route['arguments'] = null;
$route['smart_url'] = null;
$route['real_path'] = $dispatch;
$route['extension'] = Router::CalcExtension($dispatch);
$route['mime'] = Router::CalcMime($route['extension']);
Env::Set('route', $route);
//	Do dispatch.
if ($io = file_exists($dispatch)) {
    $io = $op->Template($dispatch);
}
//	Dispatch was failed.
if ($io === false) {
    OnePiece5::StackError("\\Dispatch\\ was failed.\n (file={$dispatch}, URI={$_SERVER['REQUEST_URI']})", 'en');
}
/****************************************************************************************************
 * 
 * Finish
 * 
 ****************************************************************************************************/
if (Toolbox::isHtml()) {