|
@@ -43,15 +43,11 @@ class Object_ext {
|
|
|
$vars = get_class_vars(get_class($this)); # 后期绑定,获得实例的实际类名称=>属性数组
|
|
|
foreach ($vars as $name => $value) {
|
|
|
// echoLine($name . " : " . ($this->$name != null && is_object($this->$name) ? get_class($this->$name) : "null"));
|
|
|
-// echoLine($name . " : " . var_export($this->$name, true));
|
|
|
-
|
|
|
if (isset($para[$name])) {
|
|
|
- if (is_a($this->$name, "loyalsoft\Object_ext")) {
|
|
|
-// echoLine(" load $name");
|
|
|
+ if (is_a($this->$name, __CLASS__)) { # 递归加载数据
|
|
|
$this->$name->LoadFrom($para[$name]);
|
|
|
-// echoLine(" ");
|
|
|
} else {
|
|
|
- $this->$name = $para[$name]; # 取参数中的或者默认值
|
|
|
+ $this->$name = $para[$name]; # 取参数中的或者默认值
|
|
|
}
|
|
|
}
|
|
|
}
|