ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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.
 toTokenPair ()
 Returns a pair of start and end tokens, where the end token is null if it is not necessary.

Data Fields

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

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

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, and HTMLPurifier_Node\$line.

{
$this->data = $data;
$this->is_whitespace = $is_whitespace;
$this->line = $line;
$this->col = $col;
}

Member Function Documentation

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. array

Reimplemented from HTMLPurifier_Node.

Definition at line 49 of file Text.php.

{
return array(new HTMLPurifier_Token_Text($this->data, $this->line, $this->col), null);
}

Field Documentation

HTMLPurifier_Node_Text::$data

string

Parsed character data of text.

Definition at line 26 of file Text.php.

Referenced by __construct().

HTMLPurifier_Node_Text::$is_whitespace

bool

Bool indicating if node is whitespace.

Definition at line 33 of file Text.php.

Referenced by __construct().

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: