Skip to content
PHP Ecosystem
Explore

DebugProfilerTarget

API reference › Yii3 Debug › Profiling › DebugProfilerTarget

final classYii3\Debug\Profiling\DebugProfilerTarget
ExtendsYiisoft\Profiler\Target\AbstractTarget
Sourcesrc/Profiling/DebugProfilerTarget.php

Accumulates the profiler messages dispatched to targets in memory for the current request.

Yiisoft\Profiler\Profiler::flush() moves its messages out before dispatching them, so a flush performed while the capture is still deferred would otherwise leave the Profiling panel empty.

MethodDescriptionDefined by
export()Accumulates the exported messages, so every flush of the request reaches the capture.DebugProfilerTarget
messages()Returns the messages accumulated for the current request.DebugProfilerTarget
reset()Clears the messages accumulated for the previous request.DebugProfilerTarget
public function export(Yiisoft\Profiler\Message[] $messages): void

Accumulates the exported messages, so every flush of the request reaches the capture.

Parameters

ParameterTypeDescription
$messagesYiisoft\Profiler\Message[]Profiling messages exported by the profiler.
public function messages(): list<Yiisoft\Profiler\Message>

Returns the messages accumulated for the current request.

Returns

list<Yiisoft\Profiler\Message>: Messages accumulated in export order.

public function reset(): void

Clears the messages accumulated for the previous request.