Amp\Internal\Placeholder traitPlaceholder

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 —privatebool $resolved =false
No documentation.
$result —privatemixed $result
No documentation.
$onResolved —privatecallable|Amp\Internal\ResolutionQueue|null $onResolved
No documentation.
$resolutionTrace —privatenull|array $resolutionTrace
No documentation.

Methods

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