ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
HTMLPurifier_Node_Text Class Reference

Concrete text token class. More...

+ Inheritance diagram for HTMLPurifier_Node_Text:
+ Collaboration diagram for HTMLPurifier_Node_Text:

Public Member Functions

 __construct ($data, $is_whitespace, $line=null, $col=null)
 Constructor, accepts data and determines if it is whitespace. More...
 
 toTokenPair ()
 Returns a pair of start and end tokens, where the end token is null if it is not necessary. More...
 
 toTokenPair ()
 Returns a pair of start and end tokens, where the end token is null if it is not necessary. More...
 

Data Fields

 $name = '#PCDATA'
 PCDATA tag name compatible with DTD, see HTMLPurifier_ChildDef_Custom for details. More...
 
 $data
 @type string More...
 
 $is_whitespace
 @type bool More...
 
- Data Fields inherited from HTMLPurifier_Node
 $line
 Line number of the start token in the source document @type int. More...
 
 $col
 Column number of the start token in the source document. More...
 
 $armor = array()
 Lookup array of processing that this token is exempt from. More...
 
 $dead = false
 When true, this node should be ignored as non-existent. More...
 

Detailed Description

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.

Definition at line 12 of file Text.php.

Constructor & Destructor Documentation

◆ __construct()

HTMLPurifier_Node_Text::__construct (   $data,
  $is_whitespace,
  $line = null,
  $col = null 
)

Constructor, accepts data and determines if it is whitespace.

Parameters
string$dataString parsed character data.
int$line
int$col

Definition at line 41 of file Text.php.

42 {
43 $this->data = $data;
44 $this->is_whitespace = $is_whitespace;
45 $this->line = $line;
46 $this->col = $col;
47 }
$is_whitespace
@type bool
Definition: Text.php:31
$data
@type string
Definition: Text.php:25
$line
Line number of the start token in the source document @type int.
Definition: Node.php:17
$col
Column number of the start token in the source document.
Definition: Node.php:23

References HTMLPurifier_Node\$col, $data, $is_whitespace, and HTMLPurifier_Node\$line.

Member Function Documentation

◆ toTokenPair()

HTMLPurifier_Node_Text::toTokenPair ( )

Returns a pair of start and end tokens, where the end token is null if it is not necessary.

Does not include children. @type array

Reimplemented from HTMLPurifier_Node.

Definition at line 49 of file Text.php.

49 {
50 return array(new HTMLPurifier_Token_Text($this->data, $this->line, $this->col), null);
51 }
Concrete text token class.
Definition: Text.php:13

Field Documentation

◆ $data

HTMLPurifier_Node_Text::$data

@type string

Parsed character data of text.

Definition at line 25 of file Text.php.

Referenced by __construct().

◆ $is_whitespace

HTMLPurifier_Node_Text::$is_whitespace

@type bool

Bool indicating if node is whitespace.

Definition at line 31 of file Text.php.

Referenced by __construct().

◆ $name

HTMLPurifier_Node_Text::$name = '#PCDATA'

PCDATA tag name compatible with DTD, see HTMLPurifier_ChildDef_Custom for details.

@type string

Definition at line 20 of file Text.php.


The documentation for this class was generated from the following file: