source/Core/UtilsUrl.php
public function appendUrl($sUrl, $parametersToAdd, $blFinalUrl = false, $allowParameterOverwrite = false)
    {
        $paramSeparator = self::PARAMETER_SEPARATOR;
        $finalParameters = $this->removeNotSetParameters($parametersToAdd);

        if (is_array($finalParameters) && !empty($finalParameters)) {
            $urlWithoutQuery = $sUrl;
            $separatorPlace = strpos($sUrl, '?');
            if ($separatorPlace !== false) {
                $urlWithoutQuery = substr($sUrl, 0, $separatorPlace);
                $urlQueryEscaped = substr($sUrl, $separatorPlace + 1);
                $urlQuery = str_replace($paramSeparator, '&', $urlQueryEscaped);

                $finalParameters = $this->mergeDuplicatedParameters($finalParameters, $urlQuery, $allowParameterOverwrite);
            }

            $sUrl = $this->appendParamSeparator($urlWithoutQuery);
            $sUrl .= http_build_query($finalParameters, null, $paramSeparator);
        }

        if ($sUrl && !$blFinalUrl) {
            $sUrl = $this->appendParamSeparator($sUrl);
        }

        return $sUrl;
    }
public function appendUrl($sUrl, $parametersToAdd, $blFinalUrl = false, $allowParameterOverwrite = false)
    {
        $paramSeparator = self::PARAMETER_SEPARATOR;
        $finalParameters = $this->removeNotSetParameters($parametersToAdd);

        if (is_array($finalParameters) && !empty($finalParameters)) {
            $urlWithoutQuery = $sUrl;
            $separatorPlace = strpos($sUrl, '?');
            if ($separatorPlace !== false) {
                $urlWithoutQuery = substr($sUrl, 0, $separatorPlace);
                $urlQueryEscaped = substr($sUrl, $separatorPlace + 1);
                $urlQuery = str_replace($paramSeparator, '&', $urlQueryEscaped);

                $finalParameters = $this->mergeDuplicatedParameters($finalParameters, $urlQuery, $allowParameterOverwrite);
            }

            $sUrl = $this->appendParamSeparator($urlWithoutQuery);
            $sUrl .= http_build_query($finalParameters, null, $paramSeparator);
        }

        if ($sUrl && !$blFinalUrl) {
            $sUrl = $this->appendParamSeparator($sUrl);
        }

        return $sUrl;
    }
public function appendUrl ( $ sUrl , $ parametersToAdd , $ blFinalUrl = false , $ allowParameterOverwrite = false ) { $ paramSeparator = self :: PARAMETER_SEPARATOR ; $ finalParameters = $ this -> removeNotSetParameters ( $ parametersToAdd ) ; if ( is_array ( $ finalParameters ) && ! empty ( $ finalParameters ) ) { $ urlWithoutQuery = $ sUrl ; $ separatorPlace = strpos ( $ sUrl , '?' ) ; if ( $ separatorPlace !== false ) { $ urlWithoutQuery = substr ( $ sUrl , 0 , $ separatorPlace ) ; $ urlQueryEscaped = substr ( $ sUrl , $ separatorPlace + 1 ) ; $ urlQuery = str_replace ( $ paramSeparator , '&' , $ urlQueryEscaped ) ; $ finalParameters = $ this -> mergeDuplicatedParameters ( $ finalParameters , $ urlQuery , $ allowParameterOverwrite ) ; } $ sUrl = $ this -> appendParamSeparator ( $ urlWithoutQuery ) ; $ sUrl .= http_build_query ( $ finalParameters , null , $ paramSeparator ) ; } if ( $ sUrl && ! $ blFinalUrl ) { $ sUrl = $ this -> appendParamSeparator ( $ sUrl ) ; } return $ sUrl ; }
Appends url with given parameters.

@param string $sUrl                    url to append
@param array  $parametersToAdd         parameters to append
@param bool   $blFinalUrl              final url
@param bool   $allowParameterOverwrite Decides if same parameters should overwrite query parameters.

@return string
Appends url with given parameters .