1: <?php
2:
3: 4: 5:
6: class HTMLPurifier_Token {
7: public $line;
8: public $col;
9:
10: 11: 12: 13: 14:
15: public $armor = array();
16:
17: 18: 19:
20: public $skip;
21: public $rewind;
22: public $carryover;
23:
24: public function __get($n) {
25: if ($n === 'type') {
26: trigger_error('Deprecated type property called; use instanceof', E_USER_NOTICE);
27: switch (get_class($this)) {
28: case 'HTMLPurifier_Token_Start': return 'start';
29: case 'HTMLPurifier_Token_Empty': return 'empty';
30: case 'HTMLPurifier_Token_End': return 'end';
31: case 'HTMLPurifier_Token_Text': return 'text';
32: case 'HTMLPurifier_Token_Comment': return 'comment';
33: default: return null;
34: }
35: }
36: }
37:
38: 39: 40:
41: public function position($l = null, $c = null) {
42: $this->line = $l;
43: $this->col = $c;
44: }
45:
46: 47: 48:
49: public function rawPosition($l, $c) {
50: if ($c === -1) $l++;
51: $this->line = $l;
52: $this->col = $c;
53: }
54:
55: }
56:
57:
58: