\Framework\MiddlewareDebugMiddleware

Summary

Methods
Properties
Constants
__construct()
handle()
No public properties found
No constants found
buildDebugPanel()
dumpFrameworkInfo()
dumpRequest()
dumpResponse()
$debug
N/A
No private methods found
No private properties found
N/A

Properties

$debug

$debug : bool

Type

bool — 是否启用调试输出

Methods

__construct()

__construct(bool  $debug = true) : mixed

Parameters

bool $debug

Returns

mixed —

handle()

handle(\Symfony\Component\HttpFoundation\Request  $request, callable  $next) : \Symfony\Component\HttpFoundation\Response

中间件入口.

Parameters

\Symfony\Component\HttpFoundation\Request $request

请求对象

callable $next

下一个中间件/控制器的回调

Returns

\Symfony\Component\HttpFoundation\Response —

响应对象

buildDebugPanel()

buildDebugPanel(string  $requestInfo, string  $responseInfo, string  $frameworkInfo) : string

[MODIFIED] 构建美化的、默认折叠的 Debug 面板 HTML.

Parameters

string $requestInfo
string $responseInfo
string $frameworkInfo

[NEW] 新增框架信息参数

Returns

string —

dumpFrameworkInfo()

dumpFrameworkInfo() : string

[NEW] 收集并格式化框架运行时信息.

Returns

string —

dumpRequest()

dumpRequest(\Symfony\Component\HttpFoundation\Request  $request) : string

打印请求信息.

(保持不变,返回 string).

Parameters

\Symfony\Component\HttpFoundation\Request $request

Returns

string —

dumpResponse()

dumpResponse(\Symfony\Component\HttpFoundation\Response  $response) : string

打印响应信息.

(保持不变,返回 string).

Parameters

\Symfony\Component\HttpFoundation\Response $response

Returns

string —