Skip to content
PHP Ecosystem
Explore

TimelineSpanRow

API reference › Debug Core › Panel › Timeline › TimelineSpanRow

final readonly classPHPForge\Debug\Panel\Timeline\TimelineSpanRow
Sourcesrc/Panel/Timeline/TimelineSpanRow.php

Typed view-model for one span row in the Timeline panel chart.

PropertyTypeDescriptionDefined by
$category readonly constructorstringSpan category (Command::query(), Application::handleRequest(), …), or '' when not captured.TimelineSpanRow
$cssLeft readonly constructorstringBar left offset on the chart, as a percentage string (for example, 12.5) consumed by inline style="left:<X>%".TimelineSpanRow
$cssWidth readonly constructorstringBar width on the chart, as a percentage string with a 0.4% floor so single-millisecond spans stay visible.TimelineSpanRow
$depth readonly constructorintNesting depth in the call tree; the renderer indents the row by this multiplier.TimelineSpanRow
$duration readonly constructorfloatSpan duration in milliseconds.TimelineSpanRow
$tooltip readonly constructorstringPre-formatted <title> tooltip text combining category/info, duration, peak memory, and memory delta.TimelineSpanRow
$variant readonly constructorstringCSS variant token (app / db / view / cache / mail / queue / other) derived from $category.TimelineSpanRow
MethodDescriptionDefined by
__construct()Creates a span row for the Timeline chart.TimelineSpanRow
from() staticBuilds the view row from a captured profile block and its computed chart geometry.TimelineSpanRow
public function __construct(string $category, float $duration, int $depth, string $cssLeft, string $cssWidth, string $variant, string $tooltip)

Creates a span row for the Timeline chart.

Parameters

ParameterTypeDescription
$categorystring
$durationfloat
$depthint
$cssLeftstring
$cssWidthstring
$variantstring
$tooltipstring
public static function from(PHPForge\Debug\Panel\Profile\ProfileRow $row, float $left, float $width): self

Builds the view row from a captured profile block and its computed chart geometry.

Derives the CSS variant and the tooltip text, and clamps the bar width to the visible floor (0.4%).

The indent reuses the nesting level the profiler already recorded, so the chart and the Profiling grid agree on the call tree.

Parameters

ParameterTypeDescription
$rowPHPForge\Debug\Panel\Profile\ProfileRowCaptured profile block.
$leftfloatBar left offset as a percentage of the request duration.
$widthfloatBar width as a percentage of the request duration.

Returns

self