Beispiel #1
0
 public function create_from_xml_array($data)
 {
     $this->obj_hf_parameters = array();
     $this->obj_hf_inherit = array();
     $this->obj_hf_node_filters = array();
     $this->obj_hf_tags = array();
     $this->obj_hf_outputs = array();
     $this->obj_hf_files = array();
     $this->obj_hf_kill = array();
     $this->obj_hf_resources = array();
     $this->obj_hf_system_kind = array();
     parent::create_from_xml_array($data);
     if (isset($data['@attributes']['bool_inheritable'])) {
         $this->obj_bool_inheritable = true;
     }
     if (isset($data['@attributes']['version'])) {
         $this->obj_version = $data['@attributes']['version'];
     }
     if (isset($data['hf_expression'])) {
         if (isset($data['hf_expression']['@attributes'])) {
             if (isset($data['hf_expression']['@attributes']['val'])) {
                 $this->str_expression = $data['hf_expression']['@attributes']['val'];
                 $new_expression = new strings();
                 $new_expression->obj_version = $this->obj_version;
                 $new_expression->create_from_xml_array($data['hf_expression']);
                 $this->obj_expression = $new_expression;
             }
         }
     }
     if (isset($data['hf_parameters'])) {
         if (isset($data['hf_parameters']['hf_parameter'])) {
             if (isset($data['hf_parameters']['hf_parameter']['@attributes'])) {
                 $new_param = new hf_parameter();
                 $new_param->obj_version = $this->obj_version;
                 $new_param->create_from_xml_array($data['hf_parameters']['hf_parameter']);
                 $this->obj_hf_parameters[] = $new_param;
             } else {
                 foreach ($data['hf_parameters']['hf_parameter'] as $hf_parameter) {
                     $new_param = new hf_parameter();
                     $new_param->obj_version = $this->obj_version;
                     $new_param->create_from_xml_array($hf_parameter);
                     $this->obj_hf_parameters[] = $new_param;
                 }
             }
         }
     }
     if (isset($data['hf_resources'])) {
         if (isset($data['hf_resources']['hf_resource'])) {
             if (isset($data['hf_resources']['hf_resource']['@attributes'])) {
                 $new_resource = new hf_resource();
                 $new_resource->obj_version = $this->obj_version;
                 $new_resource->create_from_xml_array($data['hf_resources']['hf_resource']);
                 $this->obj_hf_resources[] = $new_resource;
             } else {
                 foreach ($data['hf_resources']['hf_resource'] as $hf_resource) {
                     $new_resource = new hf_resource();
                     $new_resource->obj_version = $this->obj_version;
                     $new_resource->create_from_xml_array($hf_resource);
                     $this->obj_hf_resources[] = $new_resource;
                 }
             }
         }
     }
     if (isset($data['hf_node_filters'])) {
         if (isset($data['hf_node_filters']['hf_node_filter'])) {
             if (isset($data['hf_node_filters']['hf_node_filter']['@attributes'])) {
                 $new_node_filter = new hf_node_filter();
                 $new_node_filter->obj_version = $this->obj_version;
                 $new_node_filter->create_from_xml_array($data['hf_node_filters']['hf_node_filter']);
                 $this->obj_hf_node_filters[] = $new_node_filter;
             } else {
                 foreach ($data['hf_node_filters']['hf_node_filter'] as $hf_filter) {
                     $new_node_filter = new hf_node_filter();
                     $new_node_filter->obj_version = $this->obj_version;
                     $new_node_filter->create_from_xml_array($hf_filter);
                     $this->obj_hf_node_filters[] = $new_node_filter;
                 }
             }
         }
     }
     if (isset($data['hf_tags'])) {
         if (isset($data['hf_tags']['hf_tag'])) {
             if (isset($data['hf_tags']['hf_tag']['@attributes'])) {
                 $new_tag = new hf_tag();
                 $new_tag->obj_version = $this->obj_version;
                 $new_tag->create_from_xml_array($data['hf_tags']['hf_tag']);
                 $this->obj_hf_tags[] = $new_tag;
             } else {
                 foreach ($data['hf_tags']['hf_tag'] as $hf_tag) {
                     $new_tag = new hf_tag();
                     $new_tag->obj_version = $this->obj_version;
                     $new_tag->create_from_xml_array($hf_tag);
                     $this->obj_hf_tags[] = $new_tag;
                 }
             }
         }
     }
     if (isset($data['hf_outputs'])) {
         if (isset($data['hf_outputs']['hf_output'])) {
             if (isset($data['hf_outputs']['hf_output']['@attributes'])) {
                 $new_output = new hf_output();
                 $new_output->obj_version = $this->obj_version;
                 $new_output->create_from_xml_array($data['hf_outputs']['hf_output']);
                 $this->obj_hf_outputs[] = $new_output;
             } else {
                 foreach ($data['hf_outputs']['hf_output'] as $hf_output) {
                     $new_output = new hf_output();
                     $new_output->obj_version = $this->obj_version;
                     $new_output->create_from_xml_array($hf_output);
                     $this->obj_hf_outputs[] = $new_output;
                 }
             }
         }
     }
     if (isset($data['hf_files'])) {
         if (isset($data['hf_files']['hf_file'])) {
             if (isset($data['hf_files']['hf_file']['@attributes'])) {
                 $new_file = new hf_file();
                 $new_file->obj_version = $this->obj_version;
                 $new_file->create_from_xml_array($data['hf_files']['hf_file']);
                 $this->obj_hf_files[] = $new_file;
             } else {
                 foreach ($data['hf_files']['hf_file'] as $hf_file) {
                     $new_file = new hf_file();
                     $new_file->obj_version = $this->obj_version;
                     $new_file->create_from_xml_array($hf_file);
                     $this->obj_hf_files[] = $new_file;
                 }
             }
         }
     }
     if (isset($data['hf_kills'])) {
         if (isset($data['hf_kills']['hf_kill'])) {
             if (isset($data['hf_kills']['hf_kill']['@attributes'])) {
                 $new_kill = new hf_kill();
                 $new_kill->obj_version = $this->obj_version;
                 $new_kill->create_from_xml_array($data['hf_kills']['hf_kill']);
                 $this->obj_hf_kills[] = $new_kill;
             } else {
                 foreach ($data['hf_kills']['hf_kill'] as $hf_kill) {
                     $new_kill = new hf_kill();
                     $new_kill->obj_version = $this->obj_version;
                     $new_kill->create_from_xml_array($hf_kill);
                     $this->obj_hf_kills[] = $new_kill;
                 }
             }
         }
     }
     if (isset($data['hf_inherits'])) {
         if (isset($data['hf_inherits']['hf_inherit'])) {
             if (isset($data['hf_inherits']['hf_inherit']['@attributes'])) {
                 $new_inherit = new hf_inherit();
                 $new_inherit->obj_version = $this->obj_version;
                 $new_inherit->create_from_xml_array($data['hf_inherits']['hf_inherit']);
                 if (isset($data['hf_inherits']['hf_inherit']['@attributes']['name'])) {
                     $new_inherit->name = $data['hf_inherits']['hf_inherit']['@attributes']['name'];
                     $this->obj_hf_inherit[] = $new_inherit;
                 }
             } else {
                 foreach ($data['hf_inherits']['hf_inherit'] as $hf_inherit) {
                     $new_inherit = new hf_inherit();
                     $new_inherit->obj_version = $this->obj_version;
                     $new_inherit->create_from_xml_array($hf_inherit);
                     if (isset($hf_inherit['@attributes']['name'])) {
                         $new_inherit->name = $hf_inherit['@attributes']['name'];
                         $this->obj_hf_inherit[] = $new_inherit;
                     }
                 }
             }
         }
     }
     if (isset($data['hf_system_kinds'])) {
         if (isset($data['hf_system_kinds']['hf_system_kind'])) {
             if (isset($data['hf_system_kinds']['hf_system_kind']['@attributes'])) {
                 $new_system_kind = new hf_system_kind();
                 $new_system_kind->obj_version = $this->obj_version;
                 $new_system_kind->create_from_xml_array($data['hf_system_kinds']['hf_system_kind']);
                 if (isset($data['hf_system_kinds']['hf_system_kind']['@attributes']['name'])) {
                     $new_system_kind->name = $data['hf_system_kinds']['hf_system_kind']['@attributes']['name'];
                     $this->obj_hf_system_kind[] = $new_system_kind;
                 }
             } else {
                 foreach ($data['hf_system_kinds']['hf_system_kind'] as $hf_system_kind) {
                     $new_system_kind = new hf_system_kind();
                     $new_system_kind->obj_version = $this->obj_version;
                     $new_system_kind->create_from_xml_array($hf_system_kind);
                     if (isset($hf_system_kind['@attributes']['name'])) {
                         $new_system_kind->name = $hf_system_kind['@attributes']['name'];
                         $this->obj_hf_system_kind[] = $new_system_kind;
                     }
                 }
             }
         }
     }
 }