Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
16 | public function setBody($params = null) |
||
17 | { |
||
18 | if (isset($this->index)) { |
||
19 | if (isset($params['path'])) { |
||
20 | return parent::setBody([ |
||
21 | 'query' => 'IMPORT TABLE ' . |
||
22 | $this->index . |
||
23 | ' FROM ' . |
||
24 | $params['path'] |
||
25 | ]); |
||
26 | } |
||
27 | throw new RuntimeException('Missing import index path in /indices/import'); |
||
28 | } |
||
29 | throw new RuntimeException('Missing index name in /indices/import'); |
||
30 | } |
||
48 |