CancellationContext
in package
FinalYes
Immutable root request and cleanup budget read from canonical history.
Table of Contents
Properties
- $lineage : array<string|int, mixed>
- $parentRequestId : string|null
- $reason : string|null
- $requester : array<string|int, mixed>
- $requestId : string
- $rootRequestId : string
- $rootWorkflowInstanceId : string
- $rootWorkflowRunId : string
- $scopeOrigin : ScopedCancellationContext|null
- $source : string
- $cleanupDeadline : DateTimeImmutable
- $originalRequestedAt : DateTimeImmutable
- $replayClock : callable(): DateTimeImmutable|null
Methods
- deadline() : DateTimeImmutable
- fromArray() : self
- remaining() : float
- Remaining seconds at the consumed replay boundary, never the host clock.
- requestedAt() : DateTimeImmutable
- toArray() : array<string, mixed>
- __construct() : mixed
- assertScopedOrigin() : void
- text() : string
- timestamp() : DateTimeImmutable
Properties
$lineage read-only
public
array<string|int, mixed>
$lineage
$parentRequestId read-only
public
string|null
$parentRequestId
$reason read-only
public
string|null
$reason
$requester read-only
public
array<string|int, mixed>
$requester
$requestId read-only
public
string
$requestId
$rootRequestId read-only
public
string
$rootRequestId
$rootWorkflowInstanceId read-only
public
string
$rootWorkflowInstanceId
$rootWorkflowRunId read-only
public
string
$rootWorkflowRunId
$scopeOrigin read-only
public
ScopedCancellationContext|null
$scopeOrigin
= null
$source read-only
public
string
$source
$cleanupDeadline read-only
private
DateTimeImmutable
$cleanupDeadline
$originalRequestedAt read-only
private
DateTimeImmutable
$originalRequestedAt
$replayClock
private
callable(): DateTimeImmutable|null
$replayClock
= null
Methods
deadline()
public
deadline() : DateTimeImmutable
Return values
DateTimeImmutablefromArray()
public
static fromArray(array<string, mixed> $snapshot) : self
Parameters
- $snapshot : array<string, mixed>
Return values
selfremaining()
Remaining seconds at the consumed replay boundary, never the host clock.
public
remaining() : float
Return values
floatrequestedAt()
public
requestedAt() : DateTimeImmutable
Return values
DateTimeImmutabletoArray()
public
toArray() : array<string, mixed>
Return values
array<string, mixed>__construct()
private
__construct(string $requestId, string $rootRequestId, string $rootWorkflowInstanceId, string $rootWorkflowRunId, string|null $parentRequestId, string|null $reason, array<string, string> $requester, string $source, DateTimeImmutable $originalRequestedAt, DateTimeImmutable $cleanupDeadline, array<int, array{request_id: string, workflow_instance_id: string, workflow_run_id: string}> $lineage[, ScopedCancellationContext|null $scopeOrigin = null ]) : mixed
Parameters
- $requestId : string
- $rootRequestId : string
- $rootWorkflowInstanceId : string
- $rootWorkflowRunId : string
- $parentRequestId : string|null
- $reason : string|null
- $requester : array<string, string>
- $source : string
- $originalRequestedAt : DateTimeImmutable
- $cleanupDeadline : DateTimeImmutable
- $lineage : array<int, array{request_id: string, workflow_instance_id: string, workflow_run_id: string}>
- $scopeOrigin : ScopedCancellationContext|null = null
assertScopedOrigin()
private
static assertScopedOrigin(array<string, mixed> $snapshot, ScopedCancellationContext $origin, array<int, array{request_id: string, workflow_instance_id: string, workflow_run_id: string}> $lineage, array<string, string> $requester, DateTimeImmutable $requestedAt, DateTimeImmutable $deadline) : void
Parameters
- $snapshot : array<string, mixed>
- $origin : ScopedCancellationContext
- $lineage : array<int, array{request_id: string, workflow_instance_id: string, workflow_run_id: string}>
- $requester : array<string, string>
- $requestedAt : DateTimeImmutable
- $deadline : DateTimeImmutable
text()
private
static text(array<string, mixed> $value, string $key) : string
Parameters
- $value : array<string, mixed>
- $key : string
Return values
stringtimestamp()
private
static timestamp(string $value) : DateTimeImmutable
Parameters
- $value : string