function AutoloadingStorage::read

Same name and namespace in other branches
  1. main core/lib/Drupal/Core/Config/AutoloadingStorage.php \Drupal\Core\Config\AutoloadingStorage::read()

Reads configuration data from the storage.

Parameters

string $name: The name of a configuration object to load.

Return value

array|false The configuration data stored for the configuration object name. If no configuration data exists for the given name, FALSE is returned.

Overrides StorageInterface::read

File

core/lib/Drupal/Core/Config/AutoloadingStorage.php, line 55

Class

AutoloadingStorage
Defines the autoloading storage.

Namespace

Drupal\Core\Config

Code

public function read($name) : array|false {
  $this->classloader?->register(TRUE);
  try {
    $data = $this->storage
      ->read($name);
  } finally {
    $this->classloader?->unregister();
  }
  return $data;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.