1.20.x config_database_storage.inc | public ConfigDatabaseStorage::decode($raw) |
Decodes configuration data from the storage-specific format.
Parameters
string $raw: The raw configuration data string to decode.
Return value
array: The decoded configuration data as an associative array.
This is a publicly accessible static method to allow for alternative usages in data conversion scripts and also tests.
Overrides ConfigStorageInterface::decode
File
- drivers/
config_database/ config_database_storage.inc, line 289
Class
- ConfigDatabaseStorage
- Defines the database storage controller.
Code
public function decode($raw) {
// Use json_decode() directly for efficiency.
$contents = json_decode($raw, TRUE);
if (is_null($contents)) {
throw new ConfigStorageException('The configuration string could not be parsed.');
}
return $contents;
}