本文整理汇总了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;
}