s/CliArgs/Cli\Args/g
[pharext/pharext] / src / pharext / Command.php
1 <?php
2
3 namespace pharext;
4
5 /**
6 * Command interface
7 */
8 interface Command
9 {
10 /**
11 * Argument error
12 */
13 const EARGS = 1;
14 /**
15 * Build error
16 */
17 const EBUILD = 2;
18 /**
19 * Signature error
20 */
21 const ESIGN = 3;
22 /**
23 * Extract/unpack error
24 */
25 const EEXTRACT = 4;
26 /**
27 * Install error
28 */
29 const EINSTALL = 5;
30
31 /**
32 * Retrieve command line arguments
33 * @return pharext\Cli\Args
34 */
35 public function getArgs();
36
37 /**
38 * Print debug message
39 * @param string $fmt
40 * @param string ...$args
41 */
42 public function debug($fmt);
43
44 /**
45 * Print info
46 * @param string $fmt
47 * @param string ...$args
48 */
49 public function info($fmt);
50
51 /**
52 * Print warning
53 * @param string $fmt
54 * @param string ...$args
55 */
56 public function warn($fmt);
57
58 /**
59 * Print error
60 * @param string $fmt
61 * @param string ...$args
62 */
63 public function error($fmt);
64
65 /**
66 * Execute the command
67 * @param int $argc command line argument count
68 * @param array $argv command line argument list
69 */
70 public function run($argc, array $argv);
71 }