Exemplo n.º 1
0
 /**
  * Constructor method
  *
  * @param                     $name
  * @param Enlight_Config|null $info
  */
 public function __construct($name, $info = null)
 {
     $this->info = new Enlight_Config($this->getInfo(), true);
     if ($info instanceof Enlight_Config) {
         $info->setAllowModifications(true);
         $updateVersion = null;
         $updateSource = null;
         if ($this->hasInfoNewerVersion($this->info, $info)) {
             $updateVersion = $this->info->get('version');
             $updateSource = $this->info->get('source');
         }
         $this->info->merge($info);
         if ($updateVersion !== null) {
             $this->info->set('updateVersion', $updateVersion);
             $this->info->set('updateSource', $updateSource);
         }
     }
     $this->info->set('capabilities', $this->getCapabilities());
     parent::__construct($name);
 }