1 | <?php |
||
27 | class GenerateController extends Command |
||
28 | { |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $controllerName; |
||
34 | |||
35 | /** |
||
36 | * @var InputInterface |
||
37 | */ |
||
38 | protected $input; |
||
39 | |||
40 | /** |
||
41 | * @var OutputInterface |
||
42 | */ |
||
43 | protected $output; |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | */ |
||
48 | protected $path; |
||
49 | |||
50 | /** |
||
51 | * @var string |
||
52 | */ |
||
53 | protected $namespace; |
||
54 | |||
55 | /** |
||
56 | * @var string|null |
||
57 | */ |
||
58 | protected $entityName; |
||
59 | |||
60 | /** |
||
61 | * @var CreateController |
||
62 | */ |
||
63 | protected $controllerGenerator; |
||
64 | |||
65 | /** |
||
66 | * Configures the current command. |
||
67 | */ |
||
68 | 10 | protected function configure() |
|
100 | |||
101 | /** |
||
102 | * Executes the current command. |
||
103 | * |
||
104 | * This method is not abstract because you can use this class |
||
105 | * as a concrete class. In this case, instead of defining the |
||
106 | * execute() method, you set the code to execute by passing |
||
107 | * a Closure to the setCode() method. |
||
108 | * |
||
109 | * @param InputInterface $input An InputInterface instance |
||
110 | * @param OutputInterface $output An OutputInterface instance |
||
111 | * |
||
112 | * @return null|integer null or 0 if everything went fine, or an error code |
||
113 | * |
||
114 | * @throws \LogicException When this abstract method is not implemented |
||
115 | * @see setCode() |
||
116 | */ |
||
117 | 2 | protected function execute(InputInterface $input, OutputInterface $output) |
|
129 | |||
130 | /** |
||
131 | * Gets controllerName property |
||
132 | * |
||
133 | * @return string |
||
134 | */ |
||
135 | 6 | public function getControllerName() |
|
142 | |||
143 | /** |
||
144 | * Gets path property |
||
145 | * |
||
146 | * @return string |
||
147 | */ |
||
148 | 6 | public function getPath() |
|
160 | |||
161 | /** |
||
162 | * Get controller namespace |
||
163 | * |
||
164 | * @return string |
||
165 | */ |
||
166 | 4 | public function getNameSpace() |
|
173 | |||
174 | /** |
||
175 | * Get the entity name |
||
176 | * |
||
177 | * @return null|string |
||
178 | */ |
||
179 | 6 | public function getEntityName() |
|
186 | |||
187 | /** |
||
188 | * Gets controllerGenerator property |
||
189 | * |
||
190 | * @return CreateController |
||
191 | */ |
||
192 | 8 | public function getControllerGenerator() |
|
207 | |||
208 | /** |
||
209 | * Sets controllerGenerator property |
||
210 | * |
||
211 | * @param CreateController $controllerGenerator |
||
212 | * |
||
213 | * @return GenerateController |
||
214 | */ |
||
215 | 6 | public function setControllerGenerator( |
|
221 | |||
222 | /** |
||
223 | * Sets input property |
||
224 | * |
||
225 | * @param InputInterface $input |
||
226 | * |
||
227 | * @return GenerateController |
||
228 | */ |
||
229 | 8 | public function setInput(InputInterface $input) |
|
234 | |||
235 | /** |
||
236 | * Sets output property |
||
237 | * |
||
238 | * @param OutputInterface $output |
||
239 | * |
||
240 | * @return GenerateController |
||
241 | */ |
||
242 | 8 | public function setOutput(OutputInterface $output) |
|
247 | |||
248 | /** |
||
249 | * Gets the task for this command |
||
250 | * |
||
251 | * @return string |
||
252 | */ |
||
253 | 6 | protected function getTaskClass() |
|
264 | |||
265 | } |