source/Http/CurlTransport.php
private function addUrlData($url, array $data) {
        // Do nothing, if there is no url data
        if (empty($data)) {
            return $url;
        }

        if (strpos($url, '?') !== false) {
            throw new \InvalidArgumentException();
        }

        $parts[] = trim($url, '/');
        foreach ($data as $key => $value) {
            if ($value) {
                $parts[] = urlencode($key) .'/' . urlencode($value);
            } else {
                $parts[] = urlencode($key);
            }
        }
        return implode('/', $parts);
    }
private function addUrlData($url, array $data) {
        // Do nothing, if there is no url data
        if (empty($data)) {
            return $url;
        }

        if (strpos($url, '?') !== false) {
            throw new \InvalidArgumentException();
        }

        $parts[] = trim($url, '/');
        foreach ($data as $key => $value) {
            if ($value) {
                $parts[] = urlencode($key) .'/' . urlencode($value);
            } else {
                $parts[] = urlencode($key);
            }
        }
        return implode('/', $parts);
    }
private function addUrlData ( $ url , array $ data ) { // Do nothing, if there is no url data if ( empty ( $ data ) ) { return $ url ; } if ( strpos ( $ url , '?' ) !== false ) { throw new \ InvalidArgumentException ( ) ; } $ parts [ ] = trim ( $ url , '/' ) ; foreach ( $ data as $ key => $ value ) { if ( $ value ) { $ parts [ ] = urlencode ( $ key ) . '/' . urlencode ( $ value ) ; } else { $ parts [ ] = urlencode ( $ key ) ; } } return implode ( '/' , $ parts ) ; }
Add url parameters for url
@param string $url base url
@param array $data url parameters key-value data
@throws \InvalidArgumentException when url already contains GET data
@return string query string
Add url parameters for url