当前位置: 首页>>代码示例>>PHP>>正文


PHP strings::create_from_xml_array方法代码示例

本文整理汇总了PHP中strings::create_from_xml_array方法的典型用法代码示例。如果您正苦于以下问题:PHP strings::create_from_xml_array方法的具体用法?PHP strings::create_from_xml_array怎么用?PHP strings::create_from_xml_array使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在strings的用法示例。


在下文中一共展示了strings::create_from_xml_array方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: create_from_xml_array

 public function create_from_xml_array($data)
 {
     parent::create_from_xml_array($data);
     $this->obj_me_settings = array();
     // me_setting
     if (isset($data['me_settings'])) {
         if (isset($data['me_settings']['me_setting'])) {
             if (isset($data['me_settings']['me_setting']['@attributes'])) {
                 $me_setting = new me_setting();
                 $me_setting->obj_version = $this->obj_version;
                 $me_setting->create_from_xml_array($data['me_settings']['me_setting']);
                 $this->obj_me_settings[] = $me_setting;
             } else {
                 foreach ($data['me_settings']['me_setting'] as $mset) {
                     $me_setting = new me_setting();
                     $me_setting->obj_version = $this->obj_version;
                     $me_setting->create_from_xml_array($mset);
                     $this->obj_me_settings[] = $me_setting;
                 }
             }
         }
     }
     $str_expression_found = false;
     foreach ($this->obj_me_settings as $mes) {
         if ($mes->name == "str_expression") {
             $str_expression_found = true;
         }
     }
     if ($str_expression_found || 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;
             }
         }
     }
 }
开发者ID:hisapi,项目名称:his,代码行数:40,代码来源:model.classes.php


注:本文中的strings::create_from_xml_array方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。