ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
HTMLPurifier_Token Class Reference

Abstract base token class that all others inherit from. More...

+ Inheritance diagram for HTMLPurifier_Token:
+ Collaboration diagram for HTMLPurifier_Token:

Public Member Functions

 __get ($n)
 position ($l=null, $c=null)
 Sets the position of the token in the source document.
 rawPosition ($l, $c)
 Convenience function for DirectLex settings line/col position.
 toNode ()
 Converts a token into its corresponding node.

Data Fields

 $line
 Line number node was on in source document.
 $col
 Column of line node was on in source document.
 $armor = array()
 Lookup array of processing that this token is exempt from.
 $skip
 Used during MakeWellFormed.
 $rewind
 
 $carryover
 

Detailed Description

Abstract base token class that all others inherit from.

Definition at line 6 of file Token.php.

Member Function Documentation

HTMLPurifier_Token::__get (   $n)
Parameters
string$n
Returns
null|string

Definition at line 48 of file Token.php.

References $n.

{
if ($n === 'type') {
trigger_error('Deprecated type property called; use instanceof', E_USER_NOTICE);
switch (get_class($this)) {
case 'HTMLPurifier_Token_Start':
return 'start';
case 'HTMLPurifier_Token_Empty':
return 'empty';
case 'HTMLPurifier_Token_End':
return 'end';
case 'HTMLPurifier_Token_Text':
return 'text';
case 'HTMLPurifier_Token_Comment':
return 'comment';
default:
return null;
}
}
}
HTMLPurifier_Token::position (   $l = null,
  $c = null 
)

Sets the position of the token in the source document.

Parameters
int$l
int$c

Definition at line 74 of file Token.php.

{
$this->line = $l;
$this->col = $c;
}
HTMLPurifier_Token::rawPosition (   $l,
  $c 
)

Convenience function for DirectLex settings line/col position.

Parameters
int$l
int$c

Definition at line 85 of file Token.php.

{
if ($c === -1) {
$l++;
}
$this->line = $l;
$this->col = $c;
}
HTMLPurifier_Token::toNode ( )
abstract

Converts a token into its corresponding node.

Reimplemented in HTMLPurifier_Token_Tag, HTMLPurifier_Token_Text, HTMLPurifier_Token_Comment, HTMLPurifier_Token_End, and HTMLPurifier_Token_Empty.

Field Documentation

HTMLPurifier_Token::$armor = array()

Lookup array of processing that this token is exempt from.

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

Definition at line 26 of file Token.php.

Referenced by HTMLPurifier_Token_Tag\__construct().

HTMLPurifier_Token::$carryover

Definition at line 42 of file Token.php.

HTMLPurifier_Token::$col

Column of line node was on in source document.

Null if unknown. int

Definition at line 18 of file Token.php.

Referenced by HTMLPurifier_Token_Comment\__construct(), HTMLPurifier_Token_Text\__construct(), and HTMLPurifier_Token_Tag\__construct().

HTMLPurifier_Token::$line

Line number node was on in source document.

Null if unknown. int

Definition at line 12 of file Token.php.

Referenced by HTMLPurifier_Token_Comment\__construct(), HTMLPurifier_Token_Text\__construct(), and HTMLPurifier_Token_Tag\__construct().

HTMLPurifier_Token::$rewind

Definition at line 37 of file Token.php.

HTMLPurifier_Token::$skip

Used during MakeWellFormed.

Definition at line 32 of file Token.php.


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