You are here

public function SpiController::dataStoreGet in Acquia Connector 8

Same name and namespace in other branches
  1. 8.2 src/Controller/SpiController.php \Drupal\acquia_connector\Controller\SpiController::dataStoreGet()
  2. 3.x src/Controller/SpiController.php \Drupal\acquia_connector\Controller\SpiController::dataStoreGet()

Get SPI data out of local storage.

Parameters

array $keys: Array of keys to extract data for.

Return value

array Stored data or false if no data is retrievable from storage.

1 call to SpiController::dataStoreGet()
SpiController::get in src/Controller/SpiController.php
Gather site profile information about this site.

File

src/Controller/SpiController.php, line 858

Class

SpiController
SPI Controller class.

Namespace

Drupal\acquia_connector\Controller

Code

public function dataStoreGet(array $keys) {
  $store = [];
  foreach ($keys as $key) {
    if ($cache = \Drupal::cache()
      ->get('acquia.spi.' . $key)) {
      if (!empty($cache->data)) {
        $store[$key] = $cache->data;
      }
    }
  }
  return $store;
}