1 | <?php |
||
10 | class OpCommands extends \Robo\Tasks |
||
11 | { |
||
12 | /** |
||
13 | * Test the expression parser |
||
14 | * |
||
15 | * @command parse |
||
16 | * @return array |
||
17 | */ |
||
18 | public function parse($expr, $options = ['format' => 'yaml', 'dump' => false]) |
||
31 | |||
32 | /** |
||
33 | * Convert a command from one format to another, potentially with filtering. |
||
34 | * |
||
35 | * @command edit |
||
36 | * @aliases ed |
||
37 | * @filter-default-field color |
||
38 | * @filter-output |
||
39 | * @return array |
||
40 | */ |
||
41 | public function edit($data, $options = ['format' => 'yaml', 'in' => 'auto']) |
||
45 | |||
46 | /** |
||
47 | * Read the data provided to this command. |
||
48 | */ |
||
49 | protected function read($data, $in) |
||
63 | |||
64 | /** |
||
65 | * Convert our provided input data to a php array. |
||
66 | */ |
||
67 | protected function parseData($data, $in) |
||
80 | |||
81 | /** |
||
82 | * If the data type is 'auto', then try to infer what data type |
||
83 | * we should parse as based on the contents of the data. |
||
84 | */ |
||
85 | protected function inferInputFormat($data, $in) |
||
100 | } |
||
101 |