| @@ 1771-1780 (lines=10) @@ | ||
| 1768 | * |
|
| 1769 | * @return static <p>(Immutable)</p> |
|
| 1770 | */ |
|
| 1771 | public function mergeAppendKeepIndex(array $array = array(), $recursive = false) |
|
| 1772 | { |
|
| 1773 | if (true === $recursive) { |
|
| 1774 | $result = \array_replace_recursive($this->array, $array); |
|
| 1775 | } else { |
|
| 1776 | $result = \array_replace($this->array, $array); |
|
| 1777 | } |
|
| 1778 | ||
| 1779 | return static::create($result); |
|
| 1780 | } |
|
| 1781 | ||
| 1782 | /** |
|
| 1783 | * Merge the new $array into the current array. |
|
| @@ 1793-1802 (lines=10) @@ | ||
| 1790 | * |
|
| 1791 | * @return static <p>(Immutable)</p> |
|
| 1792 | */ |
|
| 1793 | public function mergeAppendNewIndex(array $array = array(), $recursive = false) |
|
| 1794 | { |
|
| 1795 | if (true === $recursive) { |
|
| 1796 | $result = \array_merge_recursive($this->array, $array); |
|
| 1797 | } else { |
|
| 1798 | $result = \array_merge($this->array, $array); |
|
| 1799 | } |
|
| 1800 | ||
| 1801 | return static::create($result); |
|
| 1802 | } |
|
| 1803 | ||
| 1804 | /** |
|
| 1805 | * Merge the the current array into the $array. |
|
| @@ 1814-1823 (lines=10) @@ | ||
| 1811 | * |
|
| 1812 | * @return static <p>(Immutable)</p> |
|
| 1813 | */ |
|
| 1814 | public function mergePrependKeepIndex(array $array = array(), $recursive = false) |
|
| 1815 | { |
|
| 1816 | if (true === $recursive) { |
|
| 1817 | $result = \array_replace_recursive($array, $this->array); |
|
| 1818 | } else { |
|
| 1819 | $result = \array_replace($array, $this->array); |
|
| 1820 | } |
|
| 1821 | ||
| 1822 | return static::create($result); |
|
| 1823 | } |
|
| 1824 | ||
| 1825 | /** |
|
| 1826 | * Merge the current array into the new $array. |
|
| @@ 1836-1845 (lines=10) @@ | ||
| 1833 | * |
|
| 1834 | * @return static <p>(Immutable)</p> |
|
| 1835 | */ |
|
| 1836 | public function mergePrependNewIndex(array $array = array(), $recursive = false) |
|
| 1837 | { |
|
| 1838 | if (true === $recursive) { |
|
| 1839 | $result = \array_merge_recursive($array, $this->array); |
|
| 1840 | } else { |
|
| 1841 | $result = \array_merge($array, $this->array); |
|
| 1842 | } |
|
| 1843 | ||
| 1844 | return static::create($result); |
|
| 1845 | } |
|
| 1846 | ||
| 1847 | /** |
|
| 1848 | * Get the min value from an array. |
|