You are here

protected function SearchApiAcquiaApi::processResponse in Acquia Search for Search API 7.2

Adjusts response structure.

Parameters

string $data: Data in JSON format.

Return value

array Search indexes list keyed by ID.

1 call to SearchApiAcquiaApi::processResponse()
SearchApiAcquiaApi::getIndexes in includes/v3/SearchApiAcquiaApi.php
Returns list of search indexes.

File

includes/v3/SearchApiAcquiaApi.php, line 233

Class

SearchApiAcquiaApi
Class SearchApiAcquiaApi.

Code

protected function processResponse($data) {
  $result = [];
  $indexes = json_decode($data, TRUE);
  if (is_array($indexes)) {
    foreach ($indexes as $index) {
      $result[$index['key']] = [
        'host' => $index['host'],
        'index_id' => $index['key'],
        'data' => $index,
      ];
    }
  }
  return $result;
}