| Total Complexity | 3 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class SupportedAddonsLoader extends ApiLoader |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Return the list of supported addons as provided by addons.silverstripe.org |
||
| 12 | * |
||
| 13 | * @return array |
||
| 14 | */ |
||
| 15 | public function getAddonNames() |
||
| 16 | { |
||
| 17 | $endpoint = 'addons.silverstripe.org/api/supported-addons'; |
||
| 18 | return $this->doRequest($endpoint, function ($responseBody) { |
||
| 19 | return isset($responseBody['addons']) ? $responseBody['addons'] : []; |
||
| 20 | }); |
||
| 21 | } |
||
| 22 | |||
| 23 | protected function getCacheKey() |
||
| 26 | } |
||
| 27 | } |
||
| 28 |