PHP 클래스 PHPHtmlParser\Dom\HtmlNode

상속: extends InnerNode
파일 보기 프로젝트 열기: paquettg/php-html-parser 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$innerHtml Remembers what the innerHtml was if it was scanned previously.
$outerHtml string Remembers what the outerHtml was if it was scanned previously.
$text string Remembers what the text was if it was scanned previously.
$textWithChildren string Remembers what the text was when we looked into all our children nodes.

공개 메소드들

메소드 설명
__construct ( $tag ) Sets up the tag of this node.
innerHtml ( ) : string Gets the inner html of this node.
outerHtml ( ) : string Gets the html of this node, including it's own tag.
text ( boolean $lookInChildren = false ) : string Gets the text of this node (if there is any text). Or get all the text in this node, including children.

보호된 메소드들

메소드 설명
clear ( ) Call this when something in the node tree has changed. Like a child has been added or a parent has been changed.
getIteratorArray ( ) : array Returns all children of this html node.

메소드 상세

__construct() 공개 메소드

Sets up the tag of this node.
public __construct ( $tag )
$tag

clear() 보호된 메소드

Call this when something in the node tree has changed. Like a child has been added or a parent has been changed.
protected clear ( )

getIteratorArray() 보호된 메소드

Returns all children of this html node.
protected getIteratorArray ( ) : array
리턴 array

innerHtml() 공개 메소드

Gets the inner html of this node.
public innerHtml ( ) : string
리턴 string

outerHtml() 공개 메소드

Gets the html of this node, including it's own tag.
public outerHtml ( ) : string
리턴 string

text() 공개 메소드

Gets the text of this node (if there is any text). Or get all the text in this node, including children.
public text ( boolean $lookInChildren = false ) : string
$lookInChildren boolean
리턴 string

프로퍼티 상세

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

Remembers what the innerHtml was if it was scanned previously.
protected $innerHtml

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

Remembers what the outerHtml was if it was scanned previously.
protected string $outerHtml
리턴 string

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

Remembers what the text was if it was scanned previously.
protected string $text
리턴 string

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

Remembers what the text was when we looked into all our children nodes.
protected string $textWithChildren
리턴 string