public function getEndpointForUrl($url)
    {
        $cacheKey = sha1($url . $this->preferredFormat . json_encode($this->supportedFormats));

        if (!isset($this->cachedEndpoints[$url])) {
            $this->cachedEndpoints[$url] = $this->fetchEndpointForUrl($url);
            if (trim($this->cachedEndpoints[$url]) === '') {
                throw new Exception('Empty url endpoints', 1360175845);
            }
            $this->endPointCache->set($cacheKey, $this->cachedEndpoints[$url]);
        } elseif ($this->endPointCache->has($cacheKey) === true) {
            $this->cachedEndpoints[$url] = $this->endPointCache->get($cacheKey);
        }

        return $this->cachedEndpoints[$url];
    }
public function getEndpointForUrl($url)
    {
        $cacheKey = sha1($url . $this->preferredFormat . json_encode($this->supportedFormats));

        if (!isset($this->cachedEndpoints[$url])) {
            $this->cachedEndpoints[$url] = $this->fetchEndpointForUrl($url);
            if (trim($this->cachedEndpoints[$url]) === '') {
                throw new Exception('Empty url endpoints', 1360175845);
            }
            $this->endPointCache->set($cacheKey, $this->cachedEndpoints[$url]);
        } elseif ($this->endPointCache->has($cacheKey) === true) {
            $this->cachedEndpoints[$url] = $this->endPointCache->get($cacheKey);
        }

        return $this->cachedEndpoints[$url];
    }
public function getEndpointForUrl ( $ url ) { $ cacheKey = sha1 ( $ url . $ this -> preferredFormat . json_encode ( $ this -> supportedFormats ) ) ; if ( ! isset ( $ this -> cachedEndpoints [ $ url ] ) ) { $ this -> cachedEndpoints [ $ url ] = $ this -> fetchEndpointForUrl ( $ url ) ; if ( trim ( $ this -> cachedEndpoints [ $ url ] ) === '' ) { throw new Exception ( 'Empty url endpoints' , 1360175845 ) ; } $ this -> endPointCache -> set ( $ cacheKey , $ this -> cachedEndpoints [ $ url ] ) ; } elseif ( $ this -> endPointCache -> has ( $ cacheKey ) === true ) { $ this -> cachedEndpoints [ $ url ] = $ this -> endPointCache -> get ( $ cacheKey ) ; } return $ this -> cachedEndpoints [ $ url ] ; }
Get the provider's endpoint URL for the supplied resource.

@param string $url The URL to get the endpoint's URL for.
@return string
@throws Exception
Get the provider s endpoint URL for the supplied resource .