src/Tool/HttpTrait.php
protected function appendParametersToUrl($url, array $parameters = array(), array $options = array())
    {
        $url = rtrim($url, '?');
        $queryString = $this->prepareQueryParams($parameters, $options);

        if ($queryString) {
            $uri = new Uri($url);
            $existingQuery = $uri->getQuery();
            $updatedQuery = empty($existingQuery) ? $queryString : $existingQuery . '&' . $queryString;
            $url = (string) $uri->withQuery($updatedQuery);
        }

        return $url;
    }
protected function appendParametersToUrl($url, array $parameters = array(), array $options = array())
    {
        $url = rtrim($url, '?');
        $queryString = $this->prepareQueryParams($parameters, $options);

        if ($queryString) {
            $uri = new Uri($url);
            $existingQuery = $uri->getQuery();
            $updatedQuery = empty($existingQuery) ? $queryString : $existingQuery . '&' . $queryString;
            $url = (string) $uri->withQuery($updatedQuery);
        }

        return $url;
    }
protected function appendParametersToUrl ( $ url , array $ parameters = array ( ) , array $ options = array ( ) ) { $ url = rtrim ( $ url , '?' ) ; $ queryString = $ this -> prepareQueryParams ( $ parameters , $ options ) ; if ( $ queryString ) { $ uri = new Uri ( $ url ) ; $ existingQuery = $ uri -> getQuery ( ) ; $ updatedQuery = empty ( $ existingQuery ) ? $ queryString : $ existingQuery . '&' . $ queryString ; $ url = ( string ) $ uri -> withQuery ( $ updatedQuery ) ; } return $ url ; }
Prepares and appends parameters, if provided, to the given url.

@param  string     $url
@param  array      $parameters
@param  string[]   $options

@return string
Prepares and appends parameters if provided to the given url .