public DatabaseStorageExpirable::getMultiple(array $keys)
Returns the stored key/value pairs for a given set of keys.
@todo What's returned for non-existing keys?
array $keys: A list of keys to retrieve.
array An associative array of items successfully returned, indexed by key.
Overrides DatabaseStorage::getMultiple
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', array( ':now' => REQUEST_TIME, ':keys[]' => $keys, ':collection' => $this->collection, ))->fetchAllKeyed(); return array_map(array($this->serializer, 'decode'), $values); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!KeyValueStore!DatabaseStorageExpirable.php/function/DatabaseStorageExpirable::getMultiple/8.1.x