PHP 클래스 PicoFeed\Scraper\CandidateParser

저자: Frederic Guillot
상속: implements PicoFeed\Scraper\ParserInterface
파일 보기 프로젝트 열기: fguillot/picofeed

공개 메소드들

메소드 설명
__construct ( string $html ) Constructor.
execute ( ) : string Get the relevant content with the list of potential attributes.
findContentWithArticle ( ) : string Find
tag.
findContentWithBody ( ) : string Find tag.
findContentWithCandidates ( ) : string Find content based on the list of tag candidates.
findNextLink ( ) : string Find link for next page of the article.
shouldRemove ( DomDocument $dom, DomNode $node ) : boolean Return false if the node should not be removed.
stripAttributes ( DomDocument $dom, DOMXPath $xpath ) Remove blacklisted attributes.
stripGarbage ( string $content ) : string Strip useless tags.
stripTags ( DOMXPath $xpath ) Remove blacklisted tags.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( string $html )
$html string

execute() 공개 메소드

Get the relevant content with the list of potential attributes.
public execute ( ) : string
리턴 string

findContentWithArticle() 공개 메소드

Find
tag.
public findContentWithArticle ( ) : string
리턴 string

findContentWithBody() 공개 메소드

Find tag.
public findContentWithBody ( ) : string
리턴 string

findContentWithCandidates() 공개 메소드

Find content based on the list of tag candidates.

shouldRemove() 공개 메소드

Return false if the node should not be removed.
public shouldRemove ( DomDocument $dom, DomNode $node ) : boolean
$dom DomDocument
$node DomNode
리턴 boolean

stripAttributes() 공개 메소드

Remove blacklisted attributes.
public stripAttributes ( DomDocument $dom, DOMXPath $xpath )
$dom DomDocument
$xpath DOMXPath

stripGarbage() 공개 메소드

Strip useless tags.
public stripGarbage ( string $content ) : string
$content string
리턴 string

stripTags() 공개 메소드

Remove blacklisted tags.
public stripTags ( DOMXPath $xpath )
$xpath DOMXPath