@@ 237-247 (lines=11) @@ | ||
234 | * |
|
235 | * @return static The current instance. |
|
236 | */ |
|
237 | public function setHelp($help) |
|
238 | { |
|
239 | if (null !== $help) { |
|
240 | Assert::string($help, 'The help text must be a string. Got: %s'); |
|
241 | Assert::notEmpty($help, 'The help text must not be empty.'); |
|
242 | } |
|
243 | ||
244 | $this->help = $help; |
|
245 | ||
246 | return $this; |
|
247 | } |
|
248 | ||
249 | /** |
|
250 | * Returns the event dispatcher used to dispatch the console events. |
@@ 361-371 (lines=11) @@ | ||
358 | * |
|
359 | * @see getDescription() |
|
360 | */ |
|
361 | public function setDescription($description) |
|
362 | { |
|
363 | if (null !== $description) { |
|
364 | Assert::string($description, 'The command description must be a string or null. Got: %s'); |
|
365 | Assert::notEmpty($description, 'The command description must not be empty.'); |
|
366 | } |
|
367 | ||
368 | $this->description = $description; |
|
369 | ||
370 | return $this; |
|
371 | } |
|
372 | ||
373 | /** |
|
374 | * Returns the help text of the command. |
|
@@ 400-410 (lines=11) @@ | ||
397 | * |
|
398 | * @see getHelp() |
|
399 | */ |
|
400 | public function setHelp($help) |
|
401 | { |
|
402 | if (null !== $help) { |
|
403 | Assert::string($help, 'The help text must be a string or null. Got: %s'); |
|
404 | Assert::notEmpty($help, 'The help text must not be empty.'); |
|
405 | } |
|
406 | ||
407 | $this->help = $help; |
|
408 | ||
409 | return $this; |
|
410 | } |
|
411 | ||
412 | /** |
|
413 | * Returns whether the command is enabled or not in the current environment. |
@@ 333-341 (lines=9) @@ | ||
330 | * |
|
331 | * @param string $page The application page. |
|
332 | */ |
|
333 | public function setApplicationPage($page) |
|
334 | { |
|
335 | if (null !== $page) { |
|
336 | Assert::string($page, 'The application page must be a string or null. Got: %s'); |
|
337 | Assert::notEmpty($page, 'The application page must not be empty.'); |
|
338 | } |
|
339 | ||
340 | $this->applicationPage = $page; |
|
341 | } |
|
342 | ||
343 | /** |
|
344 | * Returns the prefix of the files displayed when a command help is shown |