Ejemplo n.º 1
0
 /**
  * Load the Configuration data from the disk.
  */
 public function loadFromStorage()
 {
     $source = NULL;
     if (isset($this->context)) {
         $source = $this->context->getSetting('source');
     }
     $this->storage->load(NULL, $source);
     // Check if thereis a context defined, then we are iterating.
     if (isset($this->context)) {
         // Check that this configuration is supported by Configuration Management
         if (!ConfigurationManagement::validApiVersion($this->storage->getApiVersion())) {
             $this->broken = TRUE;
             return $this;
         }
     }
     $this->setData($this->storage->getData());
     $this->setDependencies($this->storage->getDependencies());
     $this->setOptionalConfigurations($this->storage->getOptionalConfigurations());
     $this->setModules($this->storage->getModules());
     // This build the Hash;
     $this->storage->getDataToSave();
     $this->setHash($this->storage->getHash());
     $this->built = TRUE;
     return $this;
 }