1 | <?php |
||
29 | class Worker implements WorkerInterface, OutputableInterface |
||
30 | { |
||
31 | /** |
||
32 | * @var ProcessInterface |
||
33 | */ |
||
34 | protected $process; |
||
35 | |||
36 | /** |
||
37 | * @var OutputInterface |
||
38 | */ |
||
39 | protected $output; |
||
40 | |||
41 | /** |
||
42 | * @var bool |
||
43 | */ |
||
44 | protected $started = false; |
||
45 | |||
46 | /** |
||
47 | * Worker constructor. |
||
48 | * |
||
49 | * @param ProcessInterface $process |
||
50 | */ |
||
51 | 8 | public function __construct(ProcessInterface $process) |
|
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | 8 | public function getProcess() |
|
63 | |||
64 | /** |
||
65 | * {@inheritdoc} |
||
66 | */ |
||
67 | 5 | public function start() |
|
76 | |||
77 | /** |
||
78 | * {@inheritdoc} |
||
79 | */ |
||
80 | 7 | public function setOutput(OutputInterface $output) |
|
84 | |||
85 | /** |
||
86 | * {@inheritdoc} |
||
87 | */ |
||
88 | 5 | public function getOutput() |
|
96 | } |
||
97 |