Context
Table of Contents
Namespaces
Interfaces
- Context
- Interface for sending messages between execution contexts, such as two coroutines or two processes.
- ContextFactory
Classes
- ContextException
- ContextPanicError
- DefaultContextFactory
- ProcessContext
- ProcessContextFactory
- StatusError
- ThreadContext
- ThreadContextFactory
Functions
- startContext() : Context<TReceive, TSend>
- contextFactory() : ContextFactory
- Gets or sets the global context factory.
- flattenThrowableBacktrace() : array<int, FlattenedTraceEntry>
- formatFlattenedBacktrace() : string
- flattenArgument() : string
Functions
startContext()
startContext(string|array<int, string> $script[, Cancellation|null $cancellation = null ]) : Context<TReceive, TSend>
Parameters
- $script : string|array<int, string>
-
Path to PHP script or array with first element as path and following elements as options to the PHP script (e.g.: ['bin/worker', 'Option1Value', 'Option2Value'].
- $cancellation : Cancellation|null = null
Tags
Return values
Context<TReceive, TSend>contextFactory()
Gets or sets the global context factory.
contextFactory([ContextFactory|null $factory = null ]) : ContextFactory
Parameters
- $factory : ContextFactory|null = null
Return values
ContextFactoryflattenThrowableBacktrace()
flattenThrowableBacktrace(Throwable $exception) : array<int, FlattenedTraceEntry>
Parameters
- $exception : Throwable
Tags
Return values
array<int, FlattenedTraceEntry> —Serializable exception backtrace, with all function arguments flattened to strings.
formatFlattenedBacktrace()
formatFlattenedBacktrace(array<string|int, mixed> $trace) : string
Parameters
- $trace : array<string|int, mixed>
-
Backtrace produced by flattenThrowableBacktrace().
Return values
stringflattenArgument()
flattenArgument(mixed $value) : string
Parameters
- $value : mixed
Return values
string —Serializable string representation of $value for backtraces.