本文整理匯總了PHP中Logs::writeGet方法的典型用法代碼示例。如果您正苦於以下問題:PHP Logs::writeGet方法的具體用法?PHP Logs::writeGet怎麽用?PHP Logs::writeGet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Logs
的用法示例。
在下文中一共展示了Logs::writeGet方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: executeServiceRoute
/**
* @param Router_Mask $route
* @param string $service_name
*
* @return Response | null
*/
protected function executeServiceRoute(\Core\Router_Mask $route, $service_name)
{
$response = null;
$class_name = '\\Service\\' . $service_name . '\\Controller_' . str_replace('/', '_', $route->controller_class_name);
// print( $class_name );
if (class_exists($class_name)) {
/** @var Controller $controller */
$controller = new $class_name($this, $route);
$response = $controller->actionPrepare();
if ($response instanceof Response) {
return $response;
}
if ($controller instanceof Controller) {
if ($this->request->method == 'GET') {
if (Config::DEV_MODE) {
Logs::writeGet($this->request->url_string . '?' . $this->request->get_params_string);
}
if (method_exists($controller, 'actionGet')) {
$response = $controller->actionGet();
}
}
if ($this->request->method == 'POST') {
if (Config::DEV_MODE) {
Logs::writePost($this->request->url_string . PHP_EOL . var_export($_POST, true));
}
if (method_exists($controller, 'actionPost')) {
$response = $controller->actionPost();
}
}
}
}
return $response;
}