download progress, cleanups
[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 debug message
18 * @param string $fmt
19 * @param string ...$args
20 */
21 public function debug($fmt);
22
23 /**
24 * Print info
25 * @param string $fmt
26 * @param string ...$args
27 */
28 public function info($fmt);
29
30 /**
31 * Print error
32 * @param string $fmt
33 * @param string ...$args
34 */
35 public function error($fmt);
36
37 /**
38 * Execute the command
39 * @param int $argc command line argument count
40 * @param array $argv command line argument list
41 */
42 public function run($argc, array $argv);
43 }