PHP 클래스 Essence\Crawler

파일 보기 프로젝트 열기: benjamminf/craft-embedded-assets

보호된 프로퍼티들

프로퍼티 타입 설명
$_Collection Essence\Provider\Collection A collection of providers.
$_Dom Essence\Dom\Document\Factory\Native DOM parser.
$_attributes

공개 메소드들

메소드 설명
__construct ( Collection $Collection, Native $Dom ) Constructor.
crawl ( string $html ) : array Extracts embeddable URLs from an HTML source.

보호된 메소드들

메소드 설명
_extractUrls ( Document $Document ) : array Extracts URLs from the given DOM document.
_extractUrlsFromtags ( Document $Document, string $tag, string $attribute ) : array Extracts URLs from tag attributes.
_filterUrls ( array $urls ) : array Filters the given URLs to return only the extractable ones.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( Collection $Collection, Native $Dom )
$Collection Essence\Provider\Collection Providers collection.
$Dom Essence\Dom\Document\Factory\Native DOM parser.

_extractUrls() 보호된 메소드

Extracts URLs from the given DOM document.
protected _extractUrls ( Document $Document ) : array
$Document Essence\Dom\Document Document.
리턴 array URLs.

_extractUrlsFromtags() 보호된 메소드

Extracts URLs from tag attributes.
protected _extractUrlsFromtags ( Document $Document, string $tag, string $attribute ) : array
$Document Essence\Dom\Document Document.
$tag string Tag name.
$attribute string Attribute name.
리턴 array URLs.

_filterUrls() 보호된 메소드

Filters the given URLs to return only the extractable ones.
protected _filterUrls ( array $urls ) : array
$urls array URLs to filter.
리턴 array Filtered URLs.

crawl() 공개 메소드

Extracts embeddable URLs from an HTML source.
public crawl ( string $html ) : array
$html string The HTML source to be extracted.
리턴 array An array of extracted URLs.

프로퍼티 상세

$_Collection 보호되어 있는 프로퍼티

A collection of providers.
protected Collection,Essence\Provider $_Collection
리턴 Essence\Provider\Collection

$_Dom 보호되어 있는 프로퍼티

DOM parser.
protected Native,Essence\Dom\Document\Factory $_Dom
리턴 Essence\Dom\Document\Factory\Native

$_attributes 보호되어 있는 프로퍼티

protected $_attributes