@@ 11-20 (lines=10) @@ | ||
8 | * |
|
9 | * @return array |
|
10 | */ |
|
11 | public function jsonSerialize() |
|
12 | { |
|
13 | $array = get_object_vars($this); |
|
14 | ||
15 | if (isset($array['attributes'])) { |
|
16 | $array = $array['attributes']; |
|
17 | } |
|
18 | ||
19 | return $array; |
|
20 | } |
|
21 | ||
22 | /** |
|
23 | * Dump object to array |
@@ 48-57 (lines=10) @@ | ||
45 | * |
|
46 | * @return array |
|
47 | */ |
|
48 | public function jsonSerialize() |
|
49 | { |
|
50 | $array = get_object_vars($this); |
|
51 | ||
52 | if (isset($array['attributes'])) { |
|
53 | $array = $array['attributes']; |
|
54 | } |
|
55 | ||
56 | return $array; |
|
57 | } |
|
58 | ||
59 | /** |
|
60 | * Convert the object into array. |