@@ 90-102 (lines=13) @@ | ||
87 | /** |
|
88 | * @return array |
|
89 | */ |
|
90 | public function toArray() { |
|
91 | $items = []; |
|
92 | ||
93 | foreach ($this->getItems() as $key => $value) { |
|
94 | if ($value instanceof IArrayable) { |
|
95 | $value = $value->toArray(); |
|
96 | } |
|
97 | ||
98 | $items[$key] = $value; |
|
99 | } |
|
100 | ||
101 | return $items; |
|
102 | } |
|
103 | ||
104 | /** |
|
105 | * @param mixed $key |
@@ 108-120 (lines=13) @@ | ||
105 | /** |
|
106 | * @return array |
|
107 | */ |
|
108 | public function toArray() { |
|
109 | $array = []; |
|
110 | ||
111 | foreach ($this->items as $key => $value) { |
|
112 | if ($value instanceof IArrayable) { |
|
113 | $value = $value->toArray(); |
|
114 | } |
|
115 | ||
116 | $array[$key] = $value; |
|
117 | } |
|
118 | ||
119 | return $array; |
|
120 | } |
|
121 | ||
122 | /** |
|
123 | * @return int |