1 : <?php
2 :
3 : /**
4 : * Abstract base token class that all others inherit from.
5 : */
6 1 : class HTMLPurifier_Token {
7 : public $line; /**< Line number node was on in source document. Null if unknown. */
8 :
9 : /**
10 : * Lookup array of processing that this token is exempt from.
11 : * Currently, valid values are "ValidateAttributes" and
12 : * "MakeWellFormed_TagClosedError"
13 : */
14 : public $armor = array();
15 :
16 : public function __get($n) {
17 : if ($n === 'type') {
18 : trigger_error('Deprecated type property called; use instanceof', E_USER_NOTICE);
19 : switch (get_class($this)) {
20 : case 'HTMLPurifier_Token_Start': return 'start';
21 : case 'HTMLPurifier_Token_Empty': return 'empty';
22 : case 'HTMLPurifier_Token_End': return 'end';
23 : case 'HTMLPurifier_Token_Text': return 'text';
24 : case 'HTMLPurifier_Token_Comment': return 'comment';
25 : default: return null;
26 : }
27 : }
28 : }
29 : }
|