HistoryPanelComparison
API reference › Yii3 Debug › Comparison › HistoryPanelComparison
Immutable structural-difference summary for one panel across two captured requests.
Counts describe JSON leaf paths only. Captured values are deliberately excluded so the comparison overview cannot reveal data that the individual panels keep behind their own presentation and redaction rules.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$id readonly constructor | string | Stable panel ID. | HistoryPanelComparison |
$label readonly constructor | string | Panel display name. | HistoryPanelComparison |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates a comparison summary for one panel across two captures. | HistoryPanelComparison |
added() | Returns the leaves present only in the target capture. | HistoryPanelComparison |
baselineState() | Returns the panel state in the baseline capture. | HistoryPanelComparison |
changed() | Returns the leaves whose value differs between captures. | HistoryPanelComparison |
differenceCount() | Returns how many leaves differ between both captures. | HistoryPanelComparison |
removed() | Returns the leaves present only in the baseline capture. | HistoryPanelComparison |
targetState() | Returns the panel state in the target capture. | HistoryPanelComparison |
unchanged() | Returns the leaves identical in both captures. | HistoryPanelComparison |
withDifferenceCounts() | Returns a copy carrying different JSON-leaf counts. | HistoryPanelComparison |
withStates() | Returns a copy carrying different panel states. | HistoryPanelComparison |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(string $id, string $label, Yii3\Debug\Comparison\HistoryPanelStates $states, Yii3\Debug\Comparison\HistoryPanelDifferenceCounts $counts)Creates a comparison summary for one panel across two captures.
Parameters
| Parameter | Type | Description |
|---|---|---|
$id | string | Stable panel ID. |
$label | string | Panel display name. |
$states | HistoryPanelStates | Panel state on each side of the comparison. |
$counts | HistoryPanelDifferenceCounts | JSON-leaf difference counts. |
added()
Section titled “added() ”public function added(): intReturns the leaves present only in the target capture.
Returns
int: JSON leaves present only in the target.
baselineState()
Section titled “baselineState() ”public function baselineState(): stringReturns the panel state in the baseline capture.
Returns
string: State of the panel in the baseline capture.
changed()
Section titled “changed() ”public function changed(): intReturns the leaves whose value differs between captures.
Returns
int: JSON leaves present in both with a different value.
differenceCount()
Section titled “differenceCount() ”public function differenceCount(): intReturns how many leaves differ between both captures.
Returns
int: Added, removed, and changed leaves combined; unchanged ones are excluded.
removed()
Section titled “removed() ”public function removed(): intReturns the leaves present only in the baseline capture.
Returns
int: JSON leaves present only in the baseline.
targetState()
Section titled “targetState() ”public function targetState(): stringReturns the panel state in the target capture.
Returns
string: State of the panel in the target capture.
unchanged()
Section titled “unchanged() ”public function unchanged(): intReturns the leaves identical in both captures.
Returns
int: JSON leaves identical in both captures.
withDifferenceCounts()
Section titled “withDifferenceCounts() ”public function withDifferenceCounts(Yii3\Debug\Comparison\HistoryPanelDifferenceCounts $counts): selfReturns a copy carrying different JSON-leaf counts.
Parameters
| Parameter | Type | Description |
|---|---|---|
$counts | HistoryPanelDifferenceCounts | Counts to apply. |
Returns
self: Comparison with the counts applied.
withStates()
Section titled “withStates() ”public function withStates(Yii3\Debug\Comparison\HistoryPanelStates $states): selfReturns a copy carrying different panel states.
Parameters
| Parameter | Type | Description |
|---|---|---|
$states | HistoryPanelStates | States to apply. |
Returns
self: Comparison with the states applied.