| @@ 1089-1098 (lines=10) @@ | ||
| 1086 | * |
|
| 1087 | * @return Arrayy |
|
| 1088 | */ |
|
| 1089 | public function mergeAppendNewIndex(array $array = array(), $recursive = false) |
|
| 1090 | { |
|
| 1091 | if (true === $recursive) { |
|
| 1092 | $result = array_merge_recursive($this->array, $array); |
|
| 1093 | } else { |
|
| 1094 | $result = array_merge($this->array, $array); |
|
| 1095 | } |
|
| 1096 | ||
| 1097 | return static::create($result); |
|
| 1098 | } |
|
| 1099 | ||
| 1100 | /** |
|
| 1101 | * Merge the current array into the new $array. |
|
| @@ 1111-1120 (lines=10) @@ | ||
| 1108 | * |
|
| 1109 | * @return Arrayy |
|
| 1110 | */ |
|
| 1111 | public function mergePrependNewIndex(array $array = array(), $recursive = false) |
|
| 1112 | { |
|
| 1113 | if (true === $recursive) { |
|
| 1114 | $result = array_merge_recursive($array, $this->array); |
|
| 1115 | } else { |
|
| 1116 | $result = array_merge($array, $this->array); |
|
| 1117 | } |
|
| 1118 | ||
| 1119 | return static::create($result); |
|
| 1120 | } |
|
| 1121 | ||
| 1122 | /** |
|
| 1123 | * Merge the the current array into the $array. |
|