1 | <?php |
||
32 | class FilesCommand extends AbstractCommand |
||
33 | { |
||
34 | const NAME = 'files'; |
||
35 | |||
36 | const API_ACTION_FILES = 'files'; |
||
37 | const API_ACTION_FILTER = 'filter'; |
||
38 | |||
39 | const OPTION_FILTER_TYPE = 'filter-type'; |
||
40 | const OPTION_FILTER_VERSION = 'filter-version'; |
||
41 | |||
42 | protected $typeFilters = array( |
||
43 | 'ce-full', |
||
44 | 'ce-patch', |
||
45 | 'ee-full', |
||
46 | 'ee-patch', |
||
47 | 'other', |
||
48 | ); |
||
49 | |||
50 | /** |
||
51 | * Configure command |
||
52 | * |
||
53 | * @return void |
||
54 | */ |
||
55 | protected function configure() |
||
74 | |||
75 | /** |
||
76 | * Execute command |
||
77 | * |
||
78 | * @param InputInterface $input |
||
79 | * @param OutputInterface $output |
||
80 | * |
||
81 | * @return void |
||
82 | */ |
||
83 | protected function execute(InputInterface $input, OutputInterface $output) |
||
98 | |||
99 | /** |
||
100 | * Get any applied filters |
||
101 | * |
||
102 | * @return string |
||
103 | */ |
||
104 | protected function getFilters() |
||
127 | |||
128 | /** |
||
129 | * Render the files action |
||
130 | * |
||
131 | * @param array $result |
||
132 | * |
||
133 | * @return void |
||
134 | */ |
||
135 | protected function render(array $result) |
||
151 | |||
152 | /** |
||
153 | * Sort files by type and name |
||
154 | * |
||
155 | * @param string[] $a |
||
156 | * @param string[] $b |
||
157 | * |
||
158 | * @return integer |
||
159 | */ |
||
160 | protected function sortFiles($a, $b) |
||
169 | } |
||
170 |