1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57 |
function toArray($camelize = true, $depth = 0) {
$out = $this->attributes;
$multi = null;
foreach ($this->children as $child) {
$key = $camelize ? Inflector::camelize($child->name) : $child->name;
$out['value'] = $child->value;
continue;
$value = $child->children[0]->value;
if ($child->attributes) {
}
}
$multi[$key][] = $value;
} else {
$out[$child->name] = $value;
}
continue;
$value = $child->attributes;
//unset($out[$key]);
}
$multi[$key][] = $value;
$out[$key] = $value;
} else {
$out[$child->name] = $value;
}
continue;
} else {
$value = $child->toArray($camelize);
$out[$key] = $value;
} else {
}
$multi[$key][] = $value;
}
}
}
}
return $out;
} |
