mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 15:02:47 +08:00
PSR规范调整
This commit is contained in:
@@ -11,17 +11,19 @@
|
||||
|
||||
namespace think\config\driver;
|
||||
|
||||
class Xml {
|
||||
public function parse($config){
|
||||
if(is_file($config)) {
|
||||
$content = simplexml_load_file($config);
|
||||
}else{
|
||||
$content = simplexml_load_string($config);
|
||||
class Xml
|
||||
{
|
||||
public function parse($config)
|
||||
{
|
||||
if (is_file($config)) {
|
||||
$content = simplexml_load_file($config);
|
||||
} else {
|
||||
$content = simplexml_load_string($config);
|
||||
}
|
||||
$result = (array)$content;
|
||||
foreach($result as $key=>$val){
|
||||
if(is_object($val)) {
|
||||
$result[$key] = (array)$val;
|
||||
$result = (array) $content;
|
||||
foreach ($result as $key => $val) {
|
||||
if (is_object($val)) {
|
||||
$result[$key] = (array) $val;
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
|
||||
Reference in New Issue
Block a user