PHP Class PHPHtmlParser\Dom\HtmlNode

Inheritance: extends InnerNode
Afficher le fichier Open project: paquettg/php-html-parser Class Usage Examples

Protected Properties

Свойство Type Description
$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.

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
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.

Method Details

__construct() public méthode

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

clear() protected méthode

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() protected méthode

Returns all children of this html node.
protected getIteratorArray ( ) : array
Résultat array

innerHtml() public méthode

Gets the inner html of this node.
public innerHtml ( ) : string
Résultat string

outerHtml() public méthode

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

text() public méthode

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
Résultat string

Property Details

$innerHtml protected_oe property

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

$outerHtml protected_oe property

Remembers what the outerHtml was if it was scanned previously.
protected string $outerHtml
Résultat string

$text protected_oe property

Remembers what the text was if it was scanned previously.
protected string $text
Résultat string

$textWithChildren protected_oe property

Remembers what the text was when we looked into all our children nodes.
protected string $textWithChildren
Résultat string