private function getUrlAdapter(UriInterface $url)
    {
        $embedFactory = $this->embedFactory;
        $url = Url::create((string) $url);

        try {
            $adapter = $embedFactory($url);
        } catch (InvalidUrlException $e) {
            throw new EmbedResolverException($e->getMessage(), 1, $e);
        } catch (EmbedException $e) {
            throw new EmbedResolverException('Provider exception occurred', 2, $e);
        }

        return $adapter;
    }
private function getUrlAdapter(UriInterface $url)
    {
        $embedFactory = $this->embedFactory;
        $url = Url::create((string) $url);

        try {
            $adapter = $embedFactory($url);
        } catch (InvalidUrlException $e) {
            throw new EmbedResolverException($e->getMessage(), 1, $e);
        } catch (EmbedException $e) {
            throw new EmbedResolverException('Provider exception occurred', 2, $e);
        }

        return $adapter;
    }
private function getUrlAdapter ( UriInterface $ url ) { $ embedFactory = $ this -> embedFactory ; $ url = Url :: create ( ( string ) $ url ) ; try { $ adapter = $ embedFactory ( $ url ) ; } catch ( InvalidUrlException $ e ) { throw new EmbedResolverException ( $ e -> getMessage ( ) , 1 , $ e ) ; } catch ( EmbedException $ e ) { throw new EmbedResolverException ( 'Provider exception occurred' , 2 , $ e ) ; } return $ adapter ; }
Return an API adapter matching the pattern of the given URL.

@param UriInterface $url

@return \Embed\Adapters\Adapter
Return an API adapter matching the pattern of the given URL .