public function FileStorage::read

Implements Drupal\Core\Config\StorageInterface::read().

Throws

Symfony\Component\Yaml\Exception\ParseException

Overrides StorageInterface::read

File

drupal/core/lib/Drupal/Core/Config/FileStorage.php, line 81
Definition of Drupal\Core\Config\FileStorage.

Class

FileStorage
Defines the file storage controller.

Namespace

Drupal\Core\Config

Code

public function read($name) {
  if (!$this
    ->exists($name)) {
    return FALSE;
  }
  $data = file_get_contents($this
    ->getFilePath($name));

  // @todo Yaml throws a ParseException on invalid data. Is it expected to be
  //   caught or not?
  $data = $this
    ->decode($data);
  return $data;
}