| @@ 102-114 (lines=13) @@ | ||
| 99 | /** |
|
| 100 | * @return array |
|
| 101 | */ |
|
| 102 | public function toValuesArray() |
|
| 103 | { |
|
| 104 | $arr = []; |
|
| 105 | foreach ($this as $value) { |
|
| 106 | if ($value instanceof Iterable) { |
|
| 107 | $arr[] = $value->toArray(); |
|
| 108 | } else { |
|
| 109 | $arr[] = $value; |
|
| 110 | } |
|
| 111 | } |
|
| 112 | ||
| 113 | return $arr; |
|
| 114 | } |
|
| 115 | ||
| 116 | public function toKeysArray() |
|
| 117 | { |
|
| @@ 129-141 (lines=13) @@ | ||
| 126 | /** |
|
| 127 | * {@inheritdoc} |
|
| 128 | */ |
|
| 129 | public function toArray() |
|
| 130 | { |
|
| 131 | $arr = []; |
|
| 132 | foreach ($this as $key => $value) { |
|
| 133 | if ($value instanceof Iterable) { |
|
| 134 | $arr[$key] = $value->toArray(); |
|
| 135 | } else { |
|
| 136 | $arr[$key] = $value; |
|
| 137 | } |
|
| 138 | } |
|
| 139 | ||
| 140 | return $arr; |
|
| 141 | } |
|
| 142 | ||
| 143 | /** |
|
| 144 | * {@inheritdoc} |
|
| @@ 100-112 (lines=13) @@ | ||
| 97 | /** |
|
| 98 | * Returns an array containing the values from this VectorLike. |
|
| 99 | */ |
|
| 100 | public function toArray() |
|
| 101 | { |
|
| 102 | $arr = []; |
|
| 103 | foreach ($this as $key => $value) { |
|
| 104 | if ($value instanceof Iterable) { |
|
| 105 | $arr[$key] = $value->toArray(); |
|
| 106 | } else { |
|
| 107 | $arr[$key] = $value; |
|
| 108 | } |
|
| 109 | } |
|
| 110 | ||
| 111 | return $arr; |
|
| 112 | } |
|
| 113 | } |
|
| 114 | ||