public function DatabaseStorage::readMultiple
public DatabaseStorage::readMultiple(array $names)
Reads configuration data from the storage.
Parameters
array $names: List of names of the configuration objects to load.
Return value
array A list of the configuration data stored for the configuration object name that could be loaded for the passed list of names.
Overrides StorageInterface::readMultiple
File
- core/lib/Drupal/Core/Config/DatabaseStorage.php, line 102
Class
- DatabaseStorage
- Defines the Database storage.
Namespace
Drupal\Core\ConfigCode
public function readMultiple(array $names) { $list = array(); try { $list = $this->connection->query('SELECT name, data FROM {' . $this->connection->escapeTable($this->table) . '} WHERE collection = :collection AND name IN ( :names[] )', array(':collection' => $this->collection, ':names[]' => $names), $this->options)->fetchAllKeyed(); foreach ($list as &$data) { $data = $this->decode($data); } } catch (\Exception $e) { // If we attempt a read without actually having the database or the table // available, just return an empty array so the caller can handle it. } return $list; }
© 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!Config!DatabaseStorage.php/function/DatabaseStorage::readMultiple/8.1.x