code/control/KapostService.php
private function mergeResultArray($leftArray, $rightArray) {
        foreach($rightArray as $key=>$value) {
            if(is_array($value) && array_key_exists($key, $leftArray)) {
                $leftArray[$key]=array_merge($leftArray[$key], $value);
            }else {
                $leftArray[$key]=$value;
            }
        }
        
        return $leftArray;
    }
private function mergeResultArray($leftArray, $rightArray) {
        foreach($rightArray as $key=>$value) {
            if(is_array($value) && array_key_exists($key, $leftArray)) {
                $leftArray[$key]=array_merge($leftArray[$key], $value);
            }else {
                $leftArray[$key]=$value;
            }
        }
        
        return $leftArray;
    }
private function mergeResultArray ( $ leftArray , $ rightArray ) { foreach ( $ rightArray as $ key => $ value ) { if ( is_array ( $ value ) && array_key_exists ( $ key , $ leftArray ) ) { $ leftArray [ $ key ] = array_merge ( $ leftArray [ $ key ] , $ value ) ; } else { $ leftArray [ $ key ] = $ value ; } } return $ leftArray ; }
Merges two arrays, overwriting the keys in the left array with the right array recurrsivly. Meaning that if a value in the right array is it self an array and the key exists in the left array it recurses into it.
@param array $leftArray Left array to merge into
@param array $rightArray Right array to merge from
@return array Resulting array
Merges two arrays overwriting the keys in the left array with the right array recurrsivly . Meaning that if a value in the right array is it self an array and the key exists in the left array it recurses into it .