PHP Class PHPHtmlParser\Dom\TextNode

Inheritance: extends LeafNode
Show file Open project: paquettg/php-html-parser Class Usage Examples

Protected Properties

Property Type Description
$convertedText string This is the converted version of the text.
$tag Tag This is a text node.
$text string This is the text in this node.

Public Methods

Method Description
__construct ( string $text ) Sets the text for this node.
innerHtml ( ) : string This node has no html, just return the text.
outerHtml ( ) : string This node has no html, just return the text.
text ( ) : string Returns the text of this node.

Protected Methods

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

Method Details

__construct() public method

Sets the text for this node.
public __construct ( string $text )
$text string

clear() protected method

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

innerHtml() public method

This node has no html, just return the text.
public innerHtml ( ) : string
return string

outerHtml() public method

This node has no html, just return the text.
public outerHtml ( ) : string
return string

text() public method

Returns the text of this node.
public text ( ) : string
return string

Property Details

$convertedText protected property

This is the converted version of the text.
protected string $convertedText
return string

$tag protected property

This is a text node.
protected Tag,PHPHtmlParser\Dom $tag
return Tag

$text protected property

This is the text in this node.
protected string $text
return string