Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
75 | private function object_to_array($obj) |
||
76 | { |
||
77 | if (is_object($obj)) |
||
78 | $obj = (array) $obj; |
||
79 | |||
80 | if (is_array($obj)) |
||
81 | { |
||
82 | $new = array(); |
||
83 | |||
84 | foreach($obj as $key => $val) |
||
85 | { |
||
86 | $new[$key] = $this->object_to_array($val); |
||
87 | } |
||
88 | } |
||
89 | else |
||
90 | $new = $obj; |
||
91 | |||
92 | return $new; |
||
93 | } |
||
94 | } |