HumHub Documentation (unofficial)

HTMLPurifier_Token_Text extends HTMLPurifier_Token
in package

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.

Table of Contents

Properties

$armor  : mixed
Lookup array of processing that this token is exempt from.
$carryover  : mixed
$col  : mixed
Column of line node was on in source document. Null if unknown.
$data  : mixed
$is_whitespace  : mixed
$line  : mixed
Line number node was on in source document. Null if unknown.
$name  : mixed
$rewind  : mixed
$skip  : mixed
Used during MakeWellFormed. See Note [Injector skips]

Methods

__construct()  : mixed
Constructor, accepts data and determines if it is whitespace.
__get()  : null|string
position()  : mixed
Sets the position of the token in the source document.
rawPosition()  : mixed
Convenience function for DirectLex settings line/col position.
toNode()  : mixed
Converts a token into its corresponding node.

Properties

$armor

Lookup array of processing that this token is exempt from.

public mixed $armor = array()

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

Tags
type

array

$carryover

public mixed $carryover
Tags
type

$col

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

public mixed $col
Tags
type

int

$data

public mixed $data
Tags
type

string

$is_whitespace

public mixed $is_whitespace
Tags
type

bool

$line

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

public mixed $line
Tags
type

int

$name

public mixed $name = '#PCDATA'
Tags
type

string

$rewind

public mixed $rewind
Tags
type

$skip

Used during MakeWellFormed. See Note [Injector skips]

public mixed $skip
Tags
type

Methods

__construct()

Constructor, accepts data and determines if it is whitespace.

public __construct(string $data[, int $line = null ][, int $col = null ]) : mixed
Parameters
$data : string

String parsed character data.

$line : int = null
$col : int = null

__get()

public __get(string $n) : null|string
Parameters
$n : string
Return values
null|string

position()

Sets the position of the token in the source document.

public position([int $l = null ][, int $c = null ]) : mixed
Parameters
$l : int = null
$c : int = null

rawPosition()

Convenience function for DirectLex settings line/col position.

public rawPosition(int $l, int $c) : mixed
Parameters
$l : int
$c : int

toNode()

Converts a token into its corresponding node.

public toNode() : mixed

        
On this page

Search results