File indexing completed on 2024-05-05 06:02:16

0001 <?php
0002 
0003 /**
0004  * Abstract base node class that all others inherit from.
0005  *
0006  * Why do we not use the DOM extension?  (1) It is not always available,
0007  * (2) it has funny constraints on the data it can represent,
0008  * whereas we want a maximally flexible representation, and (3) its
0009  * interface is a bit cumbersome.
0010  */
0011 abstract class HTMLPurifier_Node
0012 {
0013     /**
0014      * Line number of the start token in the source document
0015      * @type int
0016      */
0017     public $line;
0018 
0019     /**
0020      * Column number of the start token in the source document. Null if unknown.
0021      * @type int
0022      */
0023     public $col;
0024 
0025     /**
0026      * Lookup array of processing that this token is exempt from.
0027      * Currently, valid values are "ValidateAttributes".
0028      * @type array
0029      */
0030     public $armor = array();
0031 
0032     /**
0033      * When true, this node should be ignored as non-existent.
0034      *
0035      * Who is responsible for ignoring dead nodes?  FixNesting is
0036      * responsible for removing them before passing on to child
0037      * validators.
0038      */
0039     public $dead = false;
0040 
0041     /**
0042      * Returns a pair of start and end tokens, where the end token
0043      * is null if it is not necessary. Does not include children.
0044      * @type array
0045      */
0046     abstract public function toTokenPair();
0047 }
0048 
0049 // vim: et sw=4 sts=4