本文整理汇总了PHP中CController::SetSanitize方法的典型用法代码示例。如果您正苦于以下问题:PHP CController::SetSanitize方法的具体用法?PHP CController::SetSanitize怎么用?PHP CController::SetSanitize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CController
的用法示例。
在下文中一共展示了CController::SetSanitize方法的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;
}