| @@ 1745-1754 (lines=10) @@ | ||
| 1742 | * |
|
| 1743 | * @return Arrayy (Immutable) |
|
| 1744 | */ |
|
| 1745 | public function mergeAppendKeepIndex(array $array = array(), $recursive = false) |
|
| 1746 | { |
|
| 1747 | if (true === $recursive) { |
|
| 1748 | $result = array_replace_recursive($this->array, $array); |
|
| 1749 | } else { |
|
| 1750 | $result = array_replace($this->array, $array); |
|
| 1751 | } |
|
| 1752 | ||
| 1753 | return static::create($result); |
|
| 1754 | } |
|
| 1755 | ||
| 1756 | /** |
|
| 1757 | * Merge the new $array into the current array. |
|
| @@ 1767-1776 (lines=10) @@ | ||
| 1764 | * |
|
| 1765 | * @return Arrayy (Immutable) |
|
| 1766 | */ |
|
| 1767 | public function mergeAppendNewIndex(array $array = array(), $recursive = false) |
|
| 1768 | { |
|
| 1769 | if (true === $recursive) { |
|
| 1770 | $result = array_merge_recursive($this->array, $array); |
|
| 1771 | } else { |
|
| 1772 | $result = array_merge($this->array, $array); |
|
| 1773 | } |
|
| 1774 | ||
| 1775 | return static::create($result); |
|
| 1776 | } |
|
| 1777 | ||
| 1778 | /** |
|
| 1779 | * Merge the the current array into the $array. |
|
| @@ 1788-1797 (lines=10) @@ | ||
| 1785 | * |
|
| 1786 | * @return Arrayy (Immutable) |
|
| 1787 | */ |
|
| 1788 | public function mergePrependKeepIndex(array $array = array(), $recursive = false) |
|
| 1789 | { |
|
| 1790 | if (true === $recursive) { |
|
| 1791 | $result = array_replace_recursive($array, $this->array); |
|
| 1792 | } else { |
|
| 1793 | $result = array_replace($array, $this->array); |
|
| 1794 | } |
|
| 1795 | ||
| 1796 | return static::create($result); |
|
| 1797 | } |
|
| 1798 | ||
| 1799 | /** |
|
| 1800 | * Merge the current array into the new $array. |
|
| @@ 1810-1819 (lines=10) @@ | ||
| 1807 | * |
|
| 1808 | * @return Arrayy (Immutable) |
|
| 1809 | */ |
|
| 1810 | public function mergePrependNewIndex(array $array = array(), $recursive = false) |
|
| 1811 | { |
|
| 1812 | if (true === $recursive) { |
|
| 1813 | $result = array_merge_recursive($array, $this->array); |
|
| 1814 | } else { |
|
| 1815 | $result = array_merge($array, $this->array); |
|
| 1816 | } |
|
| 1817 | ||
| 1818 | return static::create($result); |
|
| 1819 | } |
|
| 1820 | ||
| 1821 | /** |
|
| 1822 | * Get the min value from an array. |
|