function DatabaseStorageExpirable::getMultiple
Same name in other branches
- 9 core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php \Drupal\Core\KeyValueStore\DatabaseStorageExpirable::getMultiple()
- 10 core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php \Drupal\Core\KeyValueStore\DatabaseStorageExpirable::getMultiple()
- 11.x core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php \Drupal\Core\KeyValueStore\DatabaseStorageExpirable::getMultiple()
Overrides DatabaseStorage::getMultiple
File
-
core/
lib/ Drupal/ Core/ KeyValueStore/ DatabaseStorageExpirable.php, line 46
Class
- DatabaseStorageExpirable
- Defines a default key/value store implementation for expiring items.
Namespace
Drupal\Core\KeyValueStoreCode
public function getMultiple(array $keys) {
$values = $this->connection
->query('SELECT name, value FROM {' . $this->connection
->escapeTable($this->table) . '} WHERE expire > :now AND name IN ( :keys[] ) AND collection = :collection', [
':now' => REQUEST_TIME,
':keys[]' => $keys,
':collection' => $this->collection,
])
->fetchAllKeyed();
return array_map([
$this->serializer,
'decode',
], $values);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.