public final function __construct($data)
 {
     if (!self::$access_key) {
         self::$access_key = new FW_Access_Key('extension');
     }
     $this->rel_path = $data['rel_path'];
     $this->path = $data['path'];
     $this->uri = $data['uri'];
     $this->parent = $data['parent'];
     $this->depth = $data['depth'];
     $this->customizations_locations = $data['customizations_locations'];
     $variables = fw_get_variables_from_file($this->path . '/manifest.php', array('manifest' => array()));
     $manifest = $variables['manifest'];
     unset($variables);
     if (empty($manifest['name'])) {
         $manifest['name'] = fw_id_to_title($this->get_name());
     }
     $this->manifest = new FW_Extension_Manifest($manifest);
 }
 public final function __construct(&$parent, $declared_dir, $declared_source, $URI, $depth)
 {
     if (!self::$access_key) {
         self::$access_key = new FW_Access_Key('extension');
     }
     $this->parent =& $parent;
     $this->declared_source = $declared_source;
     $this->declared_dir = $declared_dir;
     $this->declared_URI = $URI . $this->get_rel_path();
     // ! set $this->parent before calling get_rel_path()
     $this->depth = $depth;
     $manifest = array();
     if (file_exists($this->declared_dir . '/manifest.php')) {
         $variables = fw_get_variables_from_file($this->declared_dir . '/manifest.php', array('manifest' => array()));
         $manifest = $variables['manifest'];
         unset($variables);
     }
     if (empty($manifest['name'])) {
         $manifest['name'] = fw_id_to_title($this->get_name());
     }
     $this->manifest = new FW_Extension_Manifest($manifest);
 }