1 | <?php |
||
4 | trait ToArrayTrait |
||
5 | { |
||
6 | /** |
||
7 | * Export all the object properties recursivelly |
||
8 | * For each property, if the value of the property is: |
||
9 | * - object and has a method toArray returns the method |
||
10 | * - object or array return an array with all properties expoerted with this same routine |
||
11 | * - else return the property value |
||
12 | * |
||
13 | * @return array |
||
14 | */ |
||
15 | 1 | public function toArray() |
|
23 | |||
24 | 1 | private function toArrayValueInsideToArrayTrait($value) |
|
42 | } |
||
43 |