| @@ 1754-1763 (lines=10) @@ | ||
| 1751 | * |
|
| 1752 | * @return static <p>(Immutable)</p> |
|
| 1753 | */ |
|
| 1754 | public function mergeAppendKeepIndex(array $array = array(), $recursive = false) |
|
| 1755 | { |
|
| 1756 | if (true === $recursive) { |
|
| 1757 | $result = array_replace_recursive($this->array, $array); |
|
| 1758 | } else { |
|
| 1759 | $result = array_replace($this->array, $array); |
|
| 1760 | } |
|
| 1761 | ||
| 1762 | return static::create($result); |
|
| 1763 | } |
|
| 1764 | ||
| 1765 | /** |
|
| 1766 | * Merge the new $array into the current array. |
|
| @@ 1776-1785 (lines=10) @@ | ||
| 1773 | * |
|
| 1774 | * @return static <p>(Immutable)</p> |
|
| 1775 | */ |
|
| 1776 | public function mergeAppendNewIndex(array $array = array(), $recursive = false) |
|
| 1777 | { |
|
| 1778 | if (true === $recursive) { |
|
| 1779 | $result = array_merge_recursive($this->array, $array); |
|
| 1780 | } else { |
|
| 1781 | $result = array_merge($this->array, $array); |
|
| 1782 | } |
|
| 1783 | ||
| 1784 | return static::create($result); |
|
| 1785 | } |
|
| 1786 | ||
| 1787 | /** |
|
| 1788 | * Merge the the current array into the $array. |
|
| @@ 1797-1806 (lines=10) @@ | ||
| 1794 | * |
|
| 1795 | * @return static <p>(Immutable)</p> |
|
| 1796 | */ |
|
| 1797 | public function mergePrependKeepIndex(array $array = array(), $recursive = false) |
|
| 1798 | { |
|
| 1799 | if (true === $recursive) { |
|
| 1800 | $result = array_replace_recursive($array, $this->array); |
|
| 1801 | } else { |
|
| 1802 | $result = array_replace($array, $this->array); |
|
| 1803 | } |
|
| 1804 | ||
| 1805 | return static::create($result); |
|
| 1806 | } |
|
| 1807 | ||
| 1808 | /** |
|
| 1809 | * Merge the current array into the new $array. |
|
| @@ 1819-1828 (lines=10) @@ | ||
| 1816 | * |
|
| 1817 | * @return static <p>(Immutable)</p> |
|
| 1818 | */ |
|
| 1819 | public function mergePrependNewIndex(array $array = array(), $recursive = false) |
|
| 1820 | { |
|
| 1821 | if (true === $recursive) { |
|
| 1822 | $result = array_merge_recursive($array, $this->array); |
|
| 1823 | } else { |
|
| 1824 | $result = array_merge($array, $this->array); |
|
| 1825 | } |
|
| 1826 | ||
| 1827 | return static::create($result); |
|
| 1828 | } |
|
| 1829 | ||
| 1830 | /** |
|
| 1831 | * Get the min value from an array. |
|