PHP Класс PHPHtmlParser\Dom\HtmlNode

Наследование: extends InnerNode
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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