This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
yoshop/source/application/common/behavior/App.php
2020-04-25 22:20:29 +08:00

29 lines
646 B
PHP

<?php
namespace app\common\behavior;
use think\Log;
use think\Request;
/**
* 应用行为管理
* Class App
* @package app\common\behavior
*/
class App
{
/**
* 应用开始
* @param $dispatch
*/
public function appBegin($dispatch)
{
// 记录访问日志
if (!config('app_debug')) {
$request = Request::instance();
Log::record('[ ROUTE ] ' . var_export($dispatch, true), 'begin');
Log::record('[ HEADER ] ' . var_export($request->header(), true), 'begin');
Log::record('[ PARAM ] ' . var_export($request->param(), true), 'begin');
}
}
}