src/Client.php
private function prepareUrl($path)
    {
        $bits = parse_url($path);

        $path = isset($bits['path']) && $bits['path'] ? $bits['path'] : '/';

        if (substr($path, 0, 1) !== '/') {
            $path = '/' . $path;
        }

        $query = isset($bits['query']) && $bits['query'] ? '?' . $bits['query'] : '';

        return $this->getUrl() . '/api/v' . $this->getApiVersion() . $path . $query;
    }
private function prepareUrl($path)
    {
        $bits = parse_url($path);

        $path = isset($bits['path']) && $bits['path'] ? $bits['path'] : '/';

        if (substr($path, 0, 1) !== '/') {
            $path = '/' . $path;
        }

        $query = isset($bits['query']) && $bits['query'] ? '?' . $bits['query'] : '';

        return $this->getUrl() . '/api/v' . $this->getApiVersion() . $path . $query;
    }
private function prepareUrl ( $ path ) { $ bits = parse_url ( $ path ) ; $ path = isset ( $ bits [ 'path' ] ) && $ bits [ 'path' ] ? $ bits [ 'path' ] : '/' ; if ( substr ( $ path , 0 , 1 ) !== '/' ) { $ path = '/' . $ path ; } $ query = isset ( $ bits [ 'query' ] ) && $ bits [ 'query' ] ? '?' . $ bits [ 'query' ] : '' ; return $ this -> getUrl ( ) . '/api/v' . $ this -> getApiVersion ( ) . $ path . $ query ; }
Prepare URL from the given path.

@param string $path

@return string
Prepare URL from the given path .