Amp\Internal\Placeholder trait Placeholder

Trait used by Promise implementations. Do not use this trait in your code, instead compose your class from one of the available classes implementing \Amp\Promise.

Summary

Properties

Methods

Properties

$resolved — private bool $resolved = false
No documentation.
$result — private mixed $result
No documentation.
$onResolved — private callable|Amp\Internal\ResolutionQueue|null $onResolved
No documentation.
$resolutionTrace — private null|array $resolutionTrace
No documentation.

Methods

onResolve — public function onResolve(callable $onResolved)
No documentation.
Type Parameter Description Default Value
callable $onResolved No documentation. none
resolve — private function resolve(mixed $value = null)
No documentation.
Type Parameter Description Default Value
mixed $value No documentation. null
fail — private function fail(Throwable $reason)
No documentation.
Type Parameter Description Default Value
Throwable $reason Failure reason. none