ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 ()
 
- Public Member Functions inherited from HTMLPurifier_Node
 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
 string More...
 
 $is_whitespace
 bool More...
 
- Data Fields inherited from HTMLPurifier_Node
 $line
 Line number of the start token in the source document 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.

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

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

Member Function Documentation

◆ toTokenPair()

HTMLPurifier_Node_Text::toTokenPair ( )

Definition at line 49 of file Text.php.

References array, and data.

49  {
50  return array(new HTMLPurifier_Token_Text($this->data, $this->line, $this->col), null);
51  }
Add some data
Create styles array
The data for the language used.
Concrete text token class.
Definition: Text.php:12

Field Documentation

◆ $data

HTMLPurifier_Node_Text::$data

string

Parsed character data of text.

Definition at line 25 of file Text.php.

Referenced by __construct().

◆ $is_whitespace

HTMLPurifier_Node_Text::$is_whitespace

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.

string

Definition at line 20 of file Text.php.


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