| 1 | <?php |
||
| 21 | class FooGallery_PixabayClient { |
||
|
|
|||
| 22 | /** |
||
| 23 | * @var array |
||
| 24 | */ |
||
| 25 | private $optionsList = [ |
||
| 26 | 'key', |
||
| 27 | 'response_group', |
||
| 28 | 'id', |
||
| 29 | 'q', |
||
| 30 | 'lang', |
||
| 31 | 'callback', |
||
| 32 | 'image_type', |
||
| 33 | 'orientation', |
||
| 34 | 'category', |
||
| 35 | 'min_width', |
||
| 36 | 'min_height', |
||
| 37 | 'editors_choice', |
||
| 38 | 'safesearch', |
||
| 39 | 'page', |
||
| 40 | 'per_page', |
||
| 41 | 'pretty', |
||
| 42 | 'response_group', |
||
| 43 | 'order', |
||
| 44 | 'video_type' |
||
| 45 | ]; |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Root of Pixabay REST API |
||
| 49 | */ |
||
| 50 | const API_ROOT = 'https://pixabay.com/api/'; |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Get Data from Pixabay API |
||
| 54 | * |
||
| 55 | * @return mixed |
||
| 56 | */ |
||
| 57 | public function search( $key, $query ) |
||
| 81 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.