ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
Token.php
Go to the documentation of this file.
1<?php
2
6abstract class HTMLPurifier_Token
7{
12 public $line;
13
18 public $col;
19
26 public $armor = array();
27
32 public $skip;
33
37 public $rewind;
38
42 public $carryover;
43
48 public function __get($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 }
68
74 public function position($l = null, $c = null)
75 {
76 $this->line = $l;
77 $this->col = $c;
78 }
79
85 public function rawPosition($l, $c)
86 {
87 if ($c === -1) {
88 $l++;
89 }
90 $this->line = $l;
91 $this->col = $c;
92 }
93
97 abstract public function toNode();
98}
99
100// vim: et sw=4 sts=4
$n
Definition: RandomTest.php:80
global $l
Definition: afr.php:30
Abstract base token class that all others inherit from.
Definition: Token.php:7
$armor
Lookup array of processing that this token is exempt from.
Definition: Token.php:26
rawPosition($l, $c)
Convenience function for DirectLex settings line/col position.
Definition: Token.php:85
toNode()
Converts a token into its corresponding node.
$line
Line number node was on in source document.
Definition: Token.php:12
$col
Column of line node was on in source document.
Definition: Token.php:18
position($l=null, $c=null)
Sets the position of the token in the source document.
Definition: Token.php:74
$skip
Used during MakeWellFormed.
Definition: Token.php:32