f7b0c74c0f417b2dcdb6f43578c77d7acc65944c
[pharext/pharext] / src / pharext / Command.php
1 <?php
2
3 namespace pharext;
4
5 /**
6 * Command interface
7 */
8 interface Command
9 {
10 /**
11 * Retrieve command line arguments
12 * @return pharext\CliArgs
13 */
14 public function getArgs();
15
16 /**
17 * Print info
18 * @param string $fmt
19 * @param string ...$args
20 */
21 public function info($fmt);
22
23 /**
24 * Print error
25 * @param string $fmt
26 * @param string ...$args
27 */
28 public function error($fmt);
29
30 /**
31 * Execute the command
32 * @param int $argc command line argument count
33 * @param array $argv command line argument list
34 */
35 public function run($argc, array $argv);
36 }