1 | <?php |
||
18 | class ProcessBase extends Process |
||
19 | { |
||
20 | /** |
||
21 | * @var SymfonyStyle |
||
22 | */ |
||
23 | protected $io; |
||
24 | |||
25 | private $simulated = false; |
||
26 | |||
27 | private $verbose = false; |
||
28 | |||
29 | /** |
||
30 | * @var LoggerInterface |
||
31 | */ |
||
32 | private $logger; |
||
33 | |||
34 | /** |
||
35 | * @return SymfonyStyle $io |
||
36 | */ |
||
37 | public function io() |
||
38 | { |
||
39 | return $this->io; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @param $io |
||
44 | */ |
||
45 | public function setIo($io) |
||
49 | |||
50 | /** |
||
51 | * @return bool |
||
52 | */ |
||
53 | public function getVerbose() |
||
57 | |||
58 | /** |
||
59 | * @param bool $verbose |
||
60 | */ |
||
61 | public function setVerbose($verbose) |
||
65 | |||
66 | /** |
||
67 | * @return bool |
||
68 | */ |
||
69 | public function getSimulated() |
||
73 | |||
74 | /** |
||
75 | * @param bool $simulated |
||
76 | */ |
||
77 | public function setSimulated($simulated) |
||
81 | |||
82 | /** |
||
83 | * @return LoggerInterface |
||
84 | */ |
||
85 | public function getLogger() |
||
89 | |||
90 | /** |
||
91 | * @param LoggerInterface $logger |
||
92 | */ |
||
93 | public function setLogger($logger) |
||
97 | |||
98 | /** |
||
99 | * @inheritDoc |
||
100 | */ |
||
101 | public function start(callable $callback = null) |
||
119 | |||
120 | /** |
||
121 | * Helper method when you want real-time output from a Process call. See |
||
122 | * @param $type |
||
123 | * @param $buffer |
||
124 | */ |
||
125 | public static function realTime($type, $buffer) |
||
133 | |||
134 | /** |
||
135 | * Should return a closure. For now return a callable. |
||
136 | * |
||
137 | * @return callable |
||
138 | */ |
||
139 | public static function showRealtime() { |
||
142 | } |
||
143 |