| 1 |
<?php |
| 2 |
declare(strict_types=1); |
| 3 |
|
| 4 |
namespace Imagify\CLI; |
| 5 |
|
| 6 |
interface CommandInterface { |
| 7 |
/** |
| 8 |
* Get the command name. |
| 9 |
* |
| 10 |
* @return string |
| 11 |
*/ |
| 12 |
public function get_name(): string; |
| 13 |
|
| 14 |
/** |
| 15 |
* Executes the command. |
| 16 |
* |
| 17 |
* @param array $arguments Positional argument. |
| 18 |
* @param array $options Optional arguments. |
| 19 |
*/ |
| 20 |
public function __invoke( $arguments, $options ); |
| 21 |
|
| 22 |
/** |
| 23 |
* Get the positional and associative arguments a command accepts. |
| 24 |
* |
| 25 |
* @return array |
| 26 |
*/ |
| 27 |
public function get_synopsis(): array; |
| 28 |
|
| 29 |
/** |
| 30 |
* Get the command description. |
| 31 |
* |
| 32 |
* @return string |
| 33 |
*/ |
| 34 |
public function get_description(): string; |
| 35 |
} |
| 36 |
|