2008-02-10 22:38:53 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Concrete comment token class. Generally will be ignored.
|
|
|
|
*/
|
|
|
|
class HTMLPurifier_Token_Comment extends HTMLPurifier_Token
|
|
|
|
{
|
2013-07-16 11:56:14 +00:00
|
|
|
/**
|
|
|
|
* Character data within comment.
|
|
|
|
* @type string
|
|
|
|
*/
|
|
|
|
public $data;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @type bool
|
|
|
|
*/
|
2009-02-05 23:04:10 +00:00
|
|
|
public $is_whitespace = true;
|
2013-07-16 11:56:14 +00:00
|
|
|
|
2008-02-10 22:38:53 +00:00
|
|
|
/**
|
|
|
|
* Transparent constructor.
|
2008-12-06 07:28:20 +00:00
|
|
|
*
|
2013-07-16 11:56:14 +00:00
|
|
|
* @param string $data String comment data.
|
|
|
|
* @param int $line
|
|
|
|
* @param int $col
|
2008-02-10 22:38:53 +00:00
|
|
|
*/
|
2013-07-16 11:56:14 +00:00
|
|
|
public function __construct($data, $line = null, $col = null)
|
|
|
|
{
|
2008-02-10 22:38:53 +00:00
|
|
|
$this->data = $data;
|
|
|
|
$this->line = $line;
|
2013-07-16 11:56:14 +00:00
|
|
|
$this->col = $col;
|
2008-02-10 22:38:53 +00:00
|
|
|
}
|
2013-10-20 22:05:11 +00:00
|
|
|
|
|
|
|
public function toNode() {
|
|
|
|
return new HTMLPurifier_Node_Comment($this->data, $this->line, $this->col);
|
|
|
|
}
|
2008-02-10 22:38:53 +00:00
|
|
|
}
|
|
|
|
|
2008-12-06 09:24:59 +00:00
|
|
|
// vim: et sw=4 sts=4
|