本文整理匯總了PHP中CController::RequestHandle方法的典型用法代碼示例。如果您正苦於以下問題:PHP CController::RequestHandle方法的具體用法?PHP CController::RequestHandle怎麽用?PHP CController::RequestHandle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CController
的用法示例。
在下文中一共展示了CController::RequestHandle方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: dispatch
function dispatch(&$data)
{
$db =& new CDatabase();
if (function_exists("config_database")) {
config_database($db);
}
$sanitize =& new CSanitize();
$validate =& new CValidate();
if (function_exists('config_controller_class')) {
$controllername = config_controller_class();
$controller = new $controllername();
} else {
$controller = new CController();
}
$controller->RequestHandle();
$controller->SetDatabase($db);
$controller->SetSanitize($sanitize);
$controller->SetValidate($validate);
if (function_exists("config_models")) {
config_models($controller);
}
if (function_exists('config_components')) {
config_components($controller);
}
if (!function_exists('is_session') || is_session()) {
session_start();
}
$this->_check_secure($controller);
if (function_exists("config_controller")) {
config_controller($controller);
}
if (function_exists("action")) {
action($controller);
}
if (function_exists('after_action')) {
after_action($controller);
}
$template = $controller->GetTemplateFile();
$viewfile = $controller->GetViewFile();
$variable = $controller->GetVariable();
$sqllog = $controller->GetSqlLog();
$is_debug = $controller->GetDebug();
if (function_exists('config_view_class')) {
$viewname = config_view_class();
$view = new $viewname();
} else {
$view = new CView();
}
$view->SetFile($template, $viewfile);
$view->SetVariable($variable);
$view->SetSanitize($sanitize);
$view->SetController($controller);
$view->SetDebug($is_debug);
$view->SetSqlLog($sqllog);
$view->display();
if (function_exists('after_render')) {
after_render($controller);
}
$data = $variable;
return $controller;
}