1 | <?php |
||
8 | class Deferred implements PromisorInterface |
||
9 | { |
||
10 | /** |
||
11 | * @var PromiseInterface |
||
12 | */ |
||
13 | private $promise; |
||
14 | |||
15 | /** |
||
16 | * {@inheritdoc} |
||
17 | */ |
||
18 | public function promise() |
||
26 | |||
27 | /** |
||
28 | * Resolving promise with given value. |
||
29 | * |
||
30 | * @param mixed $value |
||
31 | */ |
||
32 | public function resolve($value) |
||
36 | |||
37 | /** |
||
38 | * Rejecting promise with given reason. |
||
39 | * |
||
40 | * @param mixed $reason |
||
41 | */ |
||
42 | public function reject($reason) |
||
46 | } |
||
47 |