Essence\Provider\OEmbed::_extractConfig PHP 메소드

_extractConfig() 보호된 메소드

Extracts an oEmbed configuration from the given page.
protected _extractConfig ( string $html ) : array
$html string HTML page.
리턴 array Configuration.
    protected function _extractConfig($html)
    {
        $Document = $this->_Dom->document($html);
        $links = $Document->tags('link');
        foreach ($links as $Link) {
            $format = $this->_extractFormat($Link);
            if ($format) {
                return new Config($Link->get('href'), $format);
            }
        }
        throw new Exception('Unable to extract any OEmbed endpoint');
    }