src/MediaEmbed.php
public function parseUrl($url, $config = []) {
		foreach ($this->_hosts as $stub) {
			$match = $this->_matchUrl($url, (array)$stub['url-match']);
			if (!$match) {
				continue;
			}

			$this->_match = $match;

			if (!empty($stub['fetch-match'])) {
				if (!$this->_parseLink($url, $stub['fetch-match'])) {
					return null;
				}
			}

			$stub['match'] = $this->_match;
			$Object = $this->object($stub, $config + $this->config);
			return $Object;
		}
	}
public function parseUrl($url, $config = []) {
		foreach ($this->_hosts as $stub) {
			$match = $this->_matchUrl($url, (array)$stub['url-match']);
			if (!$match) {
				continue;
			}

			$this->_match = $match;

			if (!empty($stub['fetch-match'])) {
				if (!$this->_parseLink($url, $stub['fetch-match'])) {
					return null;
				}
			}

			$stub['match'] = $this->_match;
			$Object = $this->object($stub, $config + $this->config);
			return $Object;
		}
	}
public function parseUrl ( $ url , $ config = [ ] ) { foreach ( $ this -> _hosts as $ stub ) { $ match = $ this -> _matchUrl ( $ url , ( array ) $ stub [ 'url-match' ] ) ; if ( ! $ match ) { continue ; } $ this -> _match = $ match ; if ( ! empty ( $ stub [ 'fetch-match' ] ) ) { if ( ! $ this -> _parseLink ( $ url , $ stub [ 'fetch-match' ] ) ) { return null ; } } $ stub [ 'match' ] = $ this -> _match ; $ Object = $ this -> object ( $ stub , $ config + $ this -> config ) ; return $ Object ; } }
Parse given URL.

It will return an object if the url contains valid/supported video.

@param string $url Href to check for embedded video
@param array $config
@return \MediaEmbed\Object\MediaObject|null
Parse given URL .