| @@ 23-35 (lines=13) @@ | ||
| 20 | /** |
|
| 21 | * @return array |
|
| 22 | */ |
|
| 23 | public function toValuesArray() |
|
| 24 | { |
|
| 25 | $arr = []; |
|
| 26 | foreach ($this as $value) { |
|
| 27 | if ($value instanceof Iterable) { |
|
| 28 | $arr[] = $value->toArray(); |
|
| 29 | } else { |
|
| 30 | $arr[] = $value; |
|
| 31 | } |
|
| 32 | } |
|
| 33 | ||
| 34 | return $arr; |
|
| 35 | } |
|
| 36 | ||
| 37 | public function toKeysArray() |
|
| 38 | { |
|
| @@ 50-62 (lines=13) @@ | ||
| 47 | /** |
|
| 48 | * {@inheritdoc} |
|
| 49 | */ |
|
| 50 | public function toArray() |
|
| 51 | { |
|
| 52 | $arr = []; |
|
| 53 | foreach ($this as $key => $value) { |
|
| 54 | if ($value instanceof Iterable) { |
|
| 55 | $arr[$key] = $value->toArray(); |
|
| 56 | } else { |
|
| 57 | $arr[$key] = $value; |
|
| 58 | } |
|
| 59 | } |
|
| 60 | ||
| 61 | return $arr; |
|
| 62 | } |
|
| 63 | ||
| 64 | /** |
|
| 65 | * {@inheritdoc} |
|