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

0001 <?php
0002 
0003 /**
0004  * Concrete comment token class. Generally will be ignored.
0005  */
0006 class HTMLPurifier_Token_Comment extends HTMLPurifier_Token
0007 {
0008     /**
0009      * Character data within comment.
0010      * @type string
0011      */
0012     public $data;
0013 
0014     /**
0015      * @type bool
0016      */
0017     public $is_whitespace = true;
0018 
0019     /**
0020      * Transparent constructor.
0021      *
0022      * @param string $data String comment data.
0023      * @param int $line
0024      * @param int $col
0025      */
0026     public function __construct($data, $line = null, $col = null)
0027     {
0028         $this->data = $data;
0029         $this->line = $line;
0030         $this->col = $col;
0031     }
0032 
0033     public function toNode() {
0034         return new HTMLPurifier_Node_Comment($this->data, $this->line, $this->col);
0035     }
0036 }
0037 
0038 // vim: et sw=4 sts=4