\HTMLPurifier_Token_Text

Concrete text token class.

Text tokens comprise of regular parsed character data (PCDATA) and raw character data (from the CDATA sections). Internally, their data is parsed with all entities expanded. Surprisingly, the text token does have a "tag name" called #PCDATA, which is how the DTD represents it in permissible child nodes.

Summary

Methods
Properties
Constants
__get()
position()
rawPosition()
toNode()
__construct()
$line
$col
$armor
$skip
$rewind
$carryover
$name
$data
$is_whitespace
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$line

$line : 

Line number node was on in source document. Null if unknown.

Type

$col

$col : 

Column of line node was on in source document. Null if unknown.

Type

$armor

$armor : 

Lookup array of processing that this token is exempt from.

Currently, valid values are "ValidateAttributes" and "MakeWellFormed_TagClosedError"

Type

$skip

$skip : 

Used during MakeWellFormed. See Note [Injector skips]

Type

$rewind

$rewind : 

Type

$carryover

$carryover : 

Type

$name

$name : 

Type

$data

$data : 

Type

$is_whitespace

$is_whitespace : 

Type

Methods

__get()

__get(string  $n) : null|string

Parameters

string $n

Returns

null|string

position()

position(integer  $l = null, integer  $c = null) 

Sets the position of the token in the source document.

Parameters

integer $l
integer $c

rawPosition()

rawPosition(integer  $l, integer  $c) 

Convenience function for DirectLex settings line/col position.

Parameters

integer $l
integer $c

toNode()

toNode() 

Converts a token into its corresponding node.

__construct()

__construct(string  $data, integer  $line = null, integer  $col = null) 

Constructor, accepts data and determines if it is whitespace.

Parameters

string $data

String parsed character data.

integer $line
integer $col