ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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. More...
 
 rawPosition ($l, $c)
 Convenience function for DirectLex settings line/col position. More...
 
 toNode ()
 Converts a token into its corresponding node. More...
 

Data Fields

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

Detailed Description

Abstract base token class that all others inherit from.

Definition at line 6 of file Token.php.

Member Function Documentation

◆ __get()

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

Definition at line 48 of file Token.php.

49 {
50 if ($n === 'type') {
51 trigger_error('Deprecated type property called; use instanceof', E_USER_NOTICE);
52 switch (get_class($this)) {
53 case 'HTMLPurifier_Token_Start':
54 return 'start';
55 case 'HTMLPurifier_Token_Empty':
56 return 'empty';
57 case 'HTMLPurifier_Token_End':
58 return 'end';
59 case 'HTMLPurifier_Token_Text':
60 return 'text';
61 case 'HTMLPurifier_Token_Comment':
62 return 'comment';
63 default:
64 return null;
65 }
66 }
67 }
$n
Definition: RandomTest.php:80

References $n.

◆ position()

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.

75 {
76 $this->line = $l;
77 $this->col = $c;
78 }
global $l
Definition: afr.php:30

References $l.

◆ rawPosition()

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.

86 {
87 if ($c === -1) {
88 $l++;
89 }
90 $this->line = $l;
91 $this->col = $c;
92 }

References $l.

◆ toNode()

HTMLPurifier_Token::toNode ( )
abstract

Converts a token into its corresponding node.

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

Field Documentation

◆ $armor

HTMLPurifier_Token::$armor = array()

Lookup array of processing that this token is exempt from.

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

Definition at line 26 of file Token.php.

Referenced by HTMLPurifier_Token_Tag\__construct().

◆ $carryover

HTMLPurifier_Token::$carryover

@type

Definition at line 42 of file Token.php.

◆ $col

HTMLPurifier_Token::$col

Column of line node was on in source document.

Null if unknown. @type int

Definition at line 18 of file Token.php.

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

◆ $line

HTMLPurifier_Token::$line

Line number node was on in source document.

Null if unknown. @type int

Definition at line 12 of file Token.php.

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

◆ $rewind

HTMLPurifier_Token::$rewind

@type

Definition at line 37 of file Token.php.

◆ $skip

HTMLPurifier_Token::$skip

Used during MakeWellFormed.

@type

Definition at line 32 of file Token.php.


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