ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5
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
 
 $carryover
 

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.

References $n.

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

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

References $l.

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

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

References $l, and toNode().

86  {
87  if ($c === -1) {
88  $l++;
89  }
90  $this->line = $l;
91  $this->col = $c;
92  }
global $l
Definition: afr.php:30
+ Here is the call graph for this function:

◆ toNode()

HTMLPurifier_Token::toNode ( )
abstract

Converts a token into its corresponding node.

Referenced by rawPosition().

+ Here is the caller graph for this function:

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

Definition at line 26 of file Token.php.

Referenced by HTMLPurifier_Token_Tag\__construct().

◆ $carryover

HTMLPurifier_Token::$carryover

Definition at line 42 of file Token.php.

◆ $col

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().

◆ $line

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().

◆ $rewind

HTMLPurifier_Token::$rewind

Definition at line 37 of file Token.php.

◆ $skip

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: