1 | <?php |
||
8 | class OpCommands extends \Robo\Tasks |
||
9 | { |
||
10 | /** |
||
11 | * Test the expression parser |
||
12 | * |
||
13 | * @command parse |
||
14 | * @return array |
||
15 | */ |
||
16 | public function parse($expr, $options = ['format' => 'yaml', 'dump' => false]) |
||
29 | |||
30 | /** |
||
31 | * Convert a command from one format to another, potentially with filtering. |
||
32 | * |
||
33 | * @command edit |
||
34 | * @aliases ed |
||
35 | * @return array |
||
36 | */ |
||
37 | public function edit($data, $options = ['format' => 'yaml', 'in' => 'auto']) |
||
41 | |||
42 | /** |
||
43 | * Read the data provided to this command. |
||
44 | */ |
||
45 | protected function read($data, $in) |
||
59 | |||
60 | /** |
||
61 | * Convert our provided input data to a php array. |
||
62 | */ |
||
63 | protected function parseData($data, $in) |
||
76 | |||
77 | /** |
||
78 | * If the data type is 'auto', then try to infer what data type |
||
79 | * we should parse as based on the contents of the data. |
||
80 | */ |
||
81 | protected function inferInputFormat($data, $in) |
||
96 | } |
||
97 |