Durable Workflow PHP SDK — API Reference

Guides

ScopedCancellationContext
in package

FinalYes

Immutable original scope ancestry carried by a candidate cooperative child request.

Table of Contents

Constants

SCHEMA  : mixed = 'durable-workflow.scoped-cancellation-context/v1'

Properties

$lineage  : array<string|int, mixed>
$parentRequestId  : string|null
$reason  : string|null
$requester  : array<string, string>
$requestId  : string
$rootContext  : CancellationContext
$rootRequestId  : string
$rootScopeId  : string
$rootWorkflowInstanceId  : string
$rootWorkflowRunId  : string
$scopeId  : string
$source  : string
$workflowInstanceId  : string
$workflowRunId  : string
$authorityDeadline  : DateTimeImmutable|null
$cleanupDeadline  : DateTimeImmutable
$replayClock  : callable(): DateTimeImmutable|null

Methods

deadline()  : DateTimeImmutable
fromArray()  : self
remaining()  : float
Remaining scoped budget at the consumed boundary, never the host clock.
requestedAt()  : DateTimeImmutable
rootDeadline()  : DateTimeImmutable
toArray()  : array<string, mixed>
__construct()  : mixed
assertKeys()  : void
text()  : string

Constants

Properties

Methods

fromArray()

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

remaining()

Remaining scoped budget at the consumed boundary, never the host clock.

public remaining() : float
Return values
float

__construct()

private __construct(CancellationContext $rootContext, array<int, array{request_id: string, workflow_instance_id: string, workflow_run_id: string, scope_id: string, cleanup_deadline_at: string}> $lineage, DateTimeImmutable $cleanupDeadline) : mixed
Parameters
$rootContext : CancellationContext
$lineage : array<int, array{request_id: string, workflow_instance_id: string, workflow_run_id: string, scope_id: string, cleanup_deadline_at: string}>
$cleanupDeadline : DateTimeImmutable

assertKeys()

private static assertKeys(array<string, mixed> $value, array<int, string> $keys) : void
Parameters
$value : array<string, mixed>
$keys : array<int, string>

text()

private static text(array<string, mixed> $value, string $key) : string
Parameters
$value : array<string, mixed>
$key : string
Return values
string
On this page

Search results