public function getPath($uri, array $params, $withQuery = true)
    {
        $cleanUrl = trim($this->getBaseUrl(), "/ ");
        $cleanUri = trim($uri, "/ ");

        if ($withQuery === false || empty($params))
            return sprintf("%s/%s", $this->getBaseUrl(), $cleanUri);

        // build HTTP query for GET request
        $query = http_build_query($params);
        return sprintf("/%s/%s?%s", $cleanUrl, $cleanUri, $query);
    }
public function getPath($uri, array $params, $withQuery = true)
    {
        $cleanUrl = trim($this->getBaseUrl(), "/ ");
        $cleanUri = trim($uri, "/ ");

        if ($withQuery === false || empty($params))
            return sprintf("%s/%s", $this->getBaseUrl(), $cleanUri);

        // build HTTP query for GET request
        $query = http_build_query($params);
        return sprintf("/%s/%s?%s", $cleanUrl, $cleanUri, $query);
    }
public function getPath ( $ uri , array $ params , $ withQuery = true ) { $ cleanUrl = trim ( $ this -> getBaseUrl ( ) , "/ " ) ; $ cleanUri = trim ( $ uri , "/ " ) ; if ( $ withQuery === false || empty ( $ params ) ) return sprintf ( "%s/%s" , $ this -> getBaseUrl ( ) , $ cleanUri ) ; // build HTTP query for GET request $ query = http_build_query ( $ params ) ; return sprintf ( "/%s/%s?%s" , $ cleanUrl , $ cleanUri , $ query ) ; }
Helper for creating HTTP request full paths.

@param   string      $uri
@param   array       $params
@param   boolean     $withQuery
@return  string
Helper for creating HTTP request full paths .