public FileStorage::read($name)
Implements Drupal\Core\Config\StorageInterface::read().
\Drupal\Core\Config\UnsupportedDataTypeConfigException
Overrides StorageInterface::read
public function read($name) { if (!$this->exists($name)) { return FALSE; } $filepath = $this->getFilePath($name); $data = file_get_contents($filepath); try { $data = $this->decode($data); } catch (InvalidDataTypeException $e) { throw new UnsupportedDataTypeConfigException('Invalid data type in config ' . $name . ', found in file' . $filepath . ' : ' . $e->getMessage()); } return $data; }
© 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!FileStorage.php/function/FileStorage::read/8.1.x