本文整理汇总了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;
}
}
}
}