Commit b068ec40 authored by sun's avatar sun Committed by gdd

Instantiate SignedFileStorage object only once per config object.

parent 251697b6
......@@ -10,6 +10,13 @@
*/
abstract class DrupalConfigVerifiedStorage implements DrupalConfigVerifiedStorageInterface {
/**
* The local signed file object to read from and write to.
*
* @var SignedFileStorage
*/
protected $signedFile;
/**
* Implements DrupalConfigVerifiedStorageInterface::__construct().
*/
......@@ -18,13 +25,16 @@ function __construct($name) {
}
/**
* @todo
* Instantiates a new signed file object or returns the existing one.
*
* @return
* @todo
* @return SignedFileStorage
* The signed file object for this configuration object.
*/
protected function signedFileStorage() {
return new SignedFileStorage($this->name);
if (!isset($this->signedFile)) {
$this->signedFile = new SignedFileStorage($this->name);
}
return $this->signedFile;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment