Documentation

CanCheckpoint

Snapshot / Restore selected instance properties via a Checkpoint handle.

Table of Contents

checkpointCurrentState()  : Checkpoint
Snapshot selected properties into a Checkpoint for later restore() Only public properties can be captured and restored.
checkpointablePropertyNames()  : array<string|int, string>

Methods

checkpointCurrentState()

Snapshot selected properties into a Checkpoint for later restore() Only public properties can be captured and restored.

public checkpointCurrentState([array<string|int, string>|null $properties = null ][, string|null $attributeClass = IncludeInCheckpoint::class ]) : Checkpoint
Parameters
$properties : array<string|int, string>|null = null

Names to snapshot; null discovers them by the attribute.

$attributeClass : string|null = IncludeInCheckpoint::class

With null $properties, keeps only properties carrying this attribute; null applies no filtering and takes every non-static property.

Return values
Checkpoint —

checkpointablePropertyNames()

protected checkpointablePropertyNames([string|null $attributeClass = IncludeInCheckpoint::class ]) : array<string|int, string>
Parameters
$attributeClass : string|null = IncludeInCheckpoint::class

Keeps only properties carrying this attribute; defaults to IncludeInCheckpoint, null applies no filtering.

Return values
array<string|int, string> —

Names of non-static instance properties, including non-public ones.

Search results