Added DrupalConfigStorageInterface::writeToFile().
write() called into copyToFile() previously, which needlessly re-loaded the configuration data from the active storage, whereas the data is already available.8.0.x
parent
b068ec4031
commit
598cb86d2d
|
@ -41,7 +41,7 @@ abstract class DrupalConfigVerifiedStorage implements DrupalConfigVerifiedStorag
|
|||
* Implements DrupalConfigVerifiedStorageInterface::copyToFile().
|
||||
*/
|
||||
public function copyToFile() {
|
||||
return $this->signedFileStorage()->write($this->read());
|
||||
return $this->writeToFile($this->read());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -80,7 +80,14 @@ abstract class DrupalConfigVerifiedStorage implements DrupalConfigVerifiedStorag
|
|||
*/
|
||||
public function write($data) {
|
||||
$this->writeToActive($data);
|
||||
$this->copyToFile();
|
||||
$this->writeToFile($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements DrupalConfigVerifiedStorageInterface::writeToFile().
|
||||
*/
|
||||
public function writeToFile($data) {
|
||||
return $this->signedFileStorage()->write($data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -47,6 +47,14 @@ interface DrupalConfigVerifiedStorageInterface {
|
|||
*/
|
||||
function isOutOfSync();
|
||||
|
||||
/**
|
||||
* Writes the configuration data into the active storage and the file.
|
||||
*
|
||||
* @param $data
|
||||
* The configuration data to write.
|
||||
*/
|
||||
function write($data);
|
||||
|
||||
/**
|
||||
* Writes the configuration data into the active storage but not the file.
|
||||
*
|
||||
|
@ -59,12 +67,12 @@ interface DrupalConfigVerifiedStorageInterface {
|
|||
function writeToActive($data);
|
||||
|
||||
/**
|
||||
* Writes the configuration data into the active storage and the file.
|
||||
* Writes the configuration data into the file.
|
||||
*
|
||||
* @param $data
|
||||
* The configuration data to write.
|
||||
* The configuration data to write into the file.
|
||||
*/
|
||||
function write($data);
|
||||
function writeToFile($data);
|
||||
|
||||
/**
|
||||
* Gets names starting with this prefix.
|
||||
|
|
Loading…
Reference in New Issue