Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
35 | public function search( $entityType, $string, $language ) { |
||
36 | $params = [ |
||
37 | 'search' => $string, |
||
38 | 'language' => $language, |
||
39 | 'type' => $entityType, |
||
40 | ]; |
||
41 | |||
42 | $data = $this->api->getRequest( new SimpleRequest( 'wbsearchentities', $params ) ); |
||
43 | |||
44 | $ids = []; |
||
45 | foreach ( $data['search'] as $searchResult ) { |
||
46 | $ids[] = $searchResult['id']; |
||
47 | } |
||
48 | |||
49 | return $ids; |
||
50 | } |
||
51 | |||
53 |