You are here

public function FileStorage::decode in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Config/FileStorage.php \Drupal\Core\Config\FileStorage::decode()
  2. 9 core/lib/Drupal/Core/Config/FileStorage.php \Drupal\Core\Config\FileStorage::decode()

File

core/lib/Drupal/Core/Config/FileStorage.php, line 202

Class

FileStorage
Defines the file storage.

Namespace

Drupal\Core\Config

Code

public function decode($raw) {
  $data = Yaml::decode($raw);

  // A simple string is valid YAML for any reason.
  if (!is_array($data)) {
    return FALSE;
  }
  return $data;
}