Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | declare(strict_types=1); |
| 3 | /** |
| 4 | * Pop PHP Framework (https://www.popphp.org/) |
| 5 | * |
| 6 | * @link https://github.com/popphp/popphp-framework |
| 7 | * @author Nick Sagona, III <dev@noladev.com> |
| 8 | * @copyright Copyright (c) 2009-2027 NOLA Interactive, LLC. |
| 9 | * @license https://www.popphp.org/license New BSD License |
| 10 | */ |
| 11 | |
| 12 | /** |
| 13 | * @namespace |
| 14 | */ |
| 15 | namespace Pop\Console\Command; |
| 16 | |
| 17 | /** |
| 18 | * Console command interface |
| 19 | * |
| 20 | * @category Pop |
| 21 | * @package Pop\Console |
| 22 | * @author Nick Sagona, III <dev@noladev.com> |
| 23 | * @copyright Copyright (c) 2009-2027 NOLA Interactive, LLC. |
| 24 | * @license https://www.popphp.org/license New BSD License |
| 25 | * @version 5.0.0 |
| 26 | */ |
| 27 | interface CommandInterface |
| 28 | { |
| 29 | |
| 30 | /** |
| 31 | * Set the command name |
| 32 | * |
| 33 | * @param string $name |
| 34 | * @return static |
| 35 | */ |
| 36 | public function setName(string $name): static; |
| 37 | |
| 38 | /** |
| 39 | * Set the command params |
| 40 | * |
| 41 | * @param string $params |
| 42 | * @return static |
| 43 | */ |
| 44 | public function setParams(string $params): static; |
| 45 | |
| 46 | /** |
| 47 | * Set the command help |
| 48 | * |
| 49 | * @param string $help |
| 50 | * @return static |
| 51 | */ |
| 52 | public function setHelp(string $help): static; |
| 53 | |
| 54 | /** |
| 55 | * Get the command name |
| 56 | * |
| 57 | * @return ?string |
| 58 | */ |
| 59 | public function getName(): ?string; |
| 60 | |
| 61 | /** |
| 62 | * Get the command params |
| 63 | * |
| 64 | * @return ?string |
| 65 | */ |
| 66 | public function getParams(): ?string; |
| 67 | |
| 68 | /** |
| 69 | * Get the command help |
| 70 | * |
| 71 | * @return ?string |
| 72 | */ |
| 73 | public function getHelp(): ?string; |
| 74 | |
| 75 | /** |
| 76 | * Determine if the command has name |
| 77 | * |
| 78 | * @return bool |
| 79 | */ |
| 80 | public function hasName(): bool; |
| 81 | |
| 82 | /** |
| 83 | * Determine if the command has params |
| 84 | * |
| 85 | * @return bool |
| 86 | */ |
| 87 | public function hasParams(): bool; |
| 88 | |
| 89 | /** |
| 90 | * Determine if the command has help |
| 91 | * |
| 92 | * @return bool |
| 93 | */ |
| 94 | public function hasHelp(): bool; |
| 95 | |
| 96 | /** |
| 97 | * Render the command as its name and params |
| 98 | * |
| 99 | * @return string |
| 100 | */ |
| 101 | public function __toString(): string; |
| 102 | |
| 103 | } |