1 | <?php |
||
12 | class IOStorage |
||
13 | { |
||
14 | /** |
||
15 | * @var \Symfony\Component\Console\Style\SymfonyStyle |
||
16 | */ |
||
17 | protected $io; |
||
18 | |||
19 | /** |
||
20 | * @var \Symfony\Component\Console\Input\InputInterface |
||
21 | */ |
||
22 | protected $input; |
||
23 | |||
24 | /** |
||
25 | * @var \Symfony\Component\Console\Output\OutputInterface |
||
26 | */ |
||
27 | protected $output; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $styleClass = '\Symfony\Component\Console\Style\SymfonyStyle'; |
||
33 | |||
34 | public function clear() |
||
40 | |||
41 | /** |
||
42 | * setStyleClass sets a new style class to use. |
||
43 | * |
||
44 | * @param string $styleClass Name of class to instantiate when style object |
||
45 | * is requested. Must be a subclass of SymfonyStyle. |
||
46 | */ |
||
47 | public function setStyleClass($styleClass) |
||
52 | |||
53 | /** |
||
54 | * hasStyle indicates whether there is a cached style available |
||
55 | * |
||
56 | * @return bool |
||
57 | */ |
||
58 | public function hasStyle() |
||
62 | |||
63 | /** |
||
64 | * create will instantiate a new style instance, replacing what was |
||
65 | * there before. |
||
66 | * |
||
67 | * @param InputInterface $input |
||
68 | * @param OutputInterface $output |
||
69 | * @return SymfonyStyle |
||
70 | */ |
||
71 | public function create(InputInterface $input, OutputInterface $output) |
||
77 | |||
78 | /** |
||
79 | * recreate will make a new style object iff we have cached $input |
||
80 | * and $output objects. Otherwise it clears the cached style object. |
||
81 | */ |
||
82 | protected function recreate() |
||
90 | |||
91 | /** |
||
92 | * instantiate will make a new style object from the cached input and |
||
93 | * output objects. |
||
94 | */ |
||
95 | protected function instantiate() |
||
100 | |||
101 | /** |
||
102 | * get will return the cached style object, if it exists; otherwise, |
||
103 | * it will create and cache a new style object using the provided |
||
104 | * input and output objects. |
||
105 | * |
||
106 | * @param InputInterface $input |
||
107 | * @param OutputInterface $output |
||
108 | * @return SymfonyStyle |
||
109 | */ |
||
110 | public function get(InputInterface $input, OutputInterface $output) |
||
117 | |||
118 | /** |
||
119 | * cached returns the cached style object, or null if none is available. |
||
120 | * |
||
121 | * @return SymfonyStyle|null |
||
122 | */ |
||
123 | public function cached() |
||
127 | } |
||
128 |