|
@ -30,7 +30,6 @@ class BaseCfg extends Base |
|
|
$object = new \ReflectionClass($this); |
|
|
$object = new \ReflectionClass($this); |
|
|
$properties = $object->getProperties(); |
|
|
$properties = $object->getProperties(); |
|
|
|
|
|
|
|
|
//var_dump($properties);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取类名 -> 去除命名空间 -> 转成全小写
|
|
|
//获取类名 -> 去除命名空间 -> 转成全小写
|
|
@ -40,6 +39,7 @@ class BaseCfg extends Base |
|
|
$className = "{$parentClassName}.$className"; |
|
|
$className = "{$parentClassName}.$className"; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$ret = ""; |
|
|
$ret = ""; |
|
|
foreach ($properties as $item) { |
|
|
foreach ($properties as $item) { |
|
|
|
|
|
|
|
@ -64,7 +64,7 @@ class BaseCfg extends Base |
|
|
$value = $value ? 1 : 0; |
|
|
$value = $value ? 1 : 0; |
|
|
$ret .= "{$className}.{$name} = {$value}\n"; |
|
|
$ret .= "{$className}.{$name} = {$value}\n"; |
|
|
} |
|
|
} |
|
|
else if (is_object($value) && $value instanceof BaseCfg) |
|
|
|
|
|
|
|
|
else if (is_object($value) && $value instanceof BaseCfg) |
|
|
{ |
|
|
{ |
|
|
$ret .= $value->toString($className); |
|
|
$ret .= $value->toString($className); |
|
|
} |
|
|
} |
|
|