4 * Abstract base token class that all others inherit from.
6 class HTMLPurifier_Token
{
7 public $line; /**< Line number node was on in source document. Null if unknown. */
8 public $col; /**< Column of line node was on in source document. Null if unknown. */
11 * Lookup array of processing that this token is exempt from.
12 * Currently, valid values are "ValidateAttributes" and
13 * "MakeWellFormed_TagClosedError"
15 public $armor = array();
18 * Used during MakeWellFormed.
24 public function __get($n) {
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';
39 * Sets the position of the token in the source document.
41 public function position($l = null, $c = null) {
47 * Convenience function for DirectLex settings line/col position.
49 public function rawPosition($l, $c) {