Durable Workflow PHP SDK — API Reference

Guides

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

Methods

fromArray()

public static fromArray(array<string, mixed> $snapshot) : self
Parameters
$snapshot : array<string, mixed>
Return values
self

remaining()

Remaining seconds at the consumed replay boundary, never the host clock.

public remaining() : float
Return values
float

__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
string

timestamp()

private static timestamp(string $value) : DateTimeImmutable
Parameters
$value : string
Return values
DateTimeImmutable
On this page

Search results