class ParentCoroutineContext

Methods

static mixed
set(string $id, mixed $value)

Set a value in the parent coroutine's context.

static mixed
get(string $id, mixed $default = null)

Get a value from the parent coroutine's context.

static bool
has(string $id)

Determine if a value exists in the parent coroutine's context.

static void
forget(string $id)

Remove a value from the parent coroutine's context.

static mixed
override(string $id, Closure $closure)

Override a value in the parent coroutine's context.

static mixed
getOrSet(string $id, mixed $value)

Get or set a value in the parent coroutine's context.

static array|ArrayObject|null
getContainer()

Get the parent coroutine's context container.

Details

at line 16
static mixed set(string $id, mixed $value)

Set a value in the parent coroutine's context.

Parameters

string $id
mixed $value

Return Value

mixed

at line 28
static mixed get(string $id, mixed $default = null)

Get a value from the parent coroutine's context.

Parameters

string $id
mixed $default

Return Value

mixed

at line 40
static bool has(string $id)

Determine if a value exists in the parent coroutine's context.

Parameters

string $id

Return Value

bool

at line 52
static void forget(string $id)

Remove a value from the parent coroutine's context.

Parameters

string $id

Return Value

void

at line 64
static mixed override(string $id, Closure $closure)

Override a value in the parent coroutine's context.

Parameters

string $id
Closure $closure

Return Value

mixed

at line 76
static mixed getOrSet(string $id, mixed $value)

Get or set a value in the parent coroutine's context.

Parameters

string $id
mixed $value

Return Value

mixed

at line 88
static array|ArrayObject|null getContainer()

Get the parent coroutine's context container.

Return Value

array|ArrayObject|null