1 | <?php |
||
9 | class InteractiveProcess |
||
10 | { |
||
11 | /** |
||
12 | * @var Pipe |
||
13 | */ |
||
14 | private $pipe; |
||
15 | /** |
||
16 | * @var WaitStrategy |
||
17 | */ |
||
18 | private $waitStrategy; |
||
19 | /** |
||
20 | * @var Process |
||
21 | */ |
||
22 | private $process; |
||
23 | |||
24 | /** |
||
25 | * @param Process $process |
||
26 | * @param Pipe $pipe |
||
27 | * @param WaitStrategy $waitStrategy |
||
28 | */ |
||
29 | public function __construct(Process $process, Pipe $pipe, WaitStrategy $waitStrategy) |
||
35 | |||
36 | /** |
||
37 | * @param Pipe $pipe |
||
38 | */ |
||
39 | public function updatePipe(Pipe $pipe) |
||
43 | |||
44 | /** |
||
45 | * @param WaitStrategy $waitStrategy |
||
46 | */ |
||
47 | public function updateWaitStrategy(WaitStrategy $waitStrategy) |
||
51 | |||
52 | /** |
||
53 | * Run the process. |
||
54 | */ |
||
55 | public function run() |
||
67 | |||
68 | /** |
||
69 | * @return Process |
||
70 | */ |
||
71 | public function getProcess() |
||
75 | } |
||
76 |