Implements Drupal\Core\Config\StorageInterface::read().
PDOException
Drupal\Core\Database\DatabaseExceptionWrapper Only thrown in case $this->options['throw_exception'] is TRUE.
Overrides StorageInterface::read
public function read($name) {
$data = FALSE;
// There are situations, like in the installer, where we may attempt a
// read without actually having the database available. In this case,
// catch the exception and just return an empty array so the caller can
// handle it if need be.
try {
$raw = $this->connection
->query('SELECT data FROM {' . $this->connection
->escapeTable($this->table) . '} WHERE name = :name', array(
':name' => $name,
), $this->options)
->fetchField();
if ($raw !== FALSE) {
$data = $this
->decode($raw);
}
} catch (Exception $e) {
}
return $data;
}