protected function finalView($passedView)
    {

        if (!$this->overwrittenView ) {
            return $passedView;
        }

        $overwrittenView = $this->overwrittenView;
        $this->overwrittenView = '';

        if (!is_array($overwrittenView) && !is_array($passedView)) {
            return $overwrittenView;
        }

        if (!is_array($overwrittenView) || !is_array($passedView)) {
            throw new RuntimeException("Overwritten view and passed can not be merged");
        }

        foreach ($overwrittenView as $key=>$value) {
            $passedView[$key] = $value;
        }

        return $passedView;

    }
protected function finalView($passedView)
    {

        if (!$this->overwrittenView ) {
            return $passedView;
        }

        $overwrittenView = $this->overwrittenView;
        $this->overwrittenView = '';

        if (!is_array($overwrittenView) && !is_array($passedView)) {
            return $overwrittenView;
        }

        if (!is_array($overwrittenView) || !is_array($passedView)) {
            throw new RuntimeException("Overwritten view and passed can not be merged");
        }

        foreach ($overwrittenView as $key=>$value) {
            $passedView[$key] = $value;
        }

        return $passedView;

    }
protected function finalView ( $ passedView ) { if ( ! $ this -> overwrittenView ) { return $ passedView ; } $ overwrittenView = $ this -> overwrittenView ; $ this -> overwrittenView = '' ; if ( ! is_array ( $ overwrittenView ) && ! is_array ( $ passedView ) ) { return $ overwrittenView ; } if ( ! is_array ( $ overwrittenView ) || ! is_array ( $ passedView ) ) { throw new RuntimeException ( "Overwritten view and passed can not be merged" ) ; } foreach ( $ overwrittenView as $ key => $ value ) { $ passedView [ $ key ] = $ value ; } return $ passedView ; }
Returns the overwritten view if one set, otherwise the passed one

@param string|array $passedView
@return string|array
Returns the overwritten view if one set otherwise the passed one