1 | <?php declare(strict_types=1); |
||
14 | final class ClosureChild implements ChildInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var Messenger |
||
18 | */ |
||
19 | private $messenger; |
||
20 | |||
21 | /** |
||
22 | * @var LoopInterface |
||
23 | */ |
||
24 | private $loop; |
||
25 | |||
26 | /** |
||
27 | * @param Messenger $messenger |
||
28 | * @param LoopInterface $loop |
||
29 | */ |
||
30 | 1 | private function __construct(Messenger $messenger, LoopInterface $loop) |
|
42 | |||
43 | /** |
||
44 | * @param Messenger $messenger |
||
45 | * @param LoopInterface $loop |
||
46 | * @return ClosureChild |
||
47 | */ |
||
48 | 1 | public static function create(Messenger $messenger, LoopInterface $loop): ClosureChild |
|
52 | |||
53 | /** |
||
54 | * @param string $closure |
||
55 | * @return PromiseInterface |
||
56 | */ |
||
57 | 1 | private function executeClosure(string $closure): PromiseInterface |
|
67 | } |
||
68 |