Add conversion functions for our own tree format.
[htmlpurifier.git] / library / HTMLPurifier / Token / Comment.php
blob23453c7052715e6fb87e6d0d73c1b7271cc7af1b
1 <?php
3 /**
4 * Concrete comment token class. Generally will be ignored.
5 */
6 class HTMLPurifier_Token_Comment extends HTMLPurifier_Token
8 /**
9 * Character data within comment.
10 * @type string
12 public $data;
14 /**
15 * @type bool
17 public $is_whitespace = true;
19 /**
20 * Transparent constructor.
22 * @param string $data String comment data.
23 * @param int $line
24 * @param int $col
26 public function __construct($data, $line = null, $col = null)
28 $this->data = $data;
29 $this->line = $line;
30 $this->col = $col;
33 public function toNode() {
34 return new HTMLPurifier_Node_Comment($this->data, $this->line, $this->col);
38 // vim: et sw=4 sts=4