1 | <?php |
||
15 | abstract class AbstractBaseCommand |
||
16 | { |
||
17 | /** |
||
18 | * @var InputInterface |
||
19 | */ |
||
20 | protected $input; |
||
21 | |||
22 | /** |
||
23 | * @var OutputInterface |
||
24 | */ |
||
25 | protected $output; |
||
26 | |||
27 | /** |
||
28 | * @var HelperSet |
||
29 | */ |
||
30 | protected $helperSet; |
||
31 | |||
32 | /** |
||
33 | * BaseCommand constructor. |
||
34 | * |
||
35 | * @param HelperSet $helperSet |
||
36 | */ |
||
37 | 9 | public function __construct(HelperSet $helperSet) |
|
41 | |||
42 | /** |
||
43 | * @param string $question |
||
44 | * @param \Closure $validator |
||
45 | * @param null $attempts |
||
46 | * @param null $default |
||
47 | * |
||
48 | * @return string |
||
49 | */ |
||
50 | protected function askAndValidate($question, $validator, $attempts = null, $default = null) |
||
60 | |||
61 | /** |
||
62 | * @param string $question |
||
63 | * @param null $default |
||
64 | * |
||
65 | * @return string |
||
66 | */ |
||
67 | protected function ask($question, $default = null) |
||
75 | |||
76 | /** |
||
77 | * @return OutputInterface |
||
78 | */ |
||
79 | private function getErrorOutput() |
||
87 | } |
||
88 |