Comment.php 759 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Concrete comment token class. Generally will be ignored.
  4. */
  5. class HTMLPurifier_Token_Comment extends HTMLPurifier_Token
  6. {
  7. /**
  8. * Character data within comment.
  9. * @type string
  10. */
  11. public $data;
  12. /**
  13. * @type bool
  14. */
  15. public $is_whitespace = true;
  16. /**
  17. * Transparent constructor.
  18. *
  19. * @param string $data String comment data.
  20. * @param int $line
  21. * @param int $col
  22. */
  23. public function __construct($data, $line = null, $col = null)
  24. {
  25. $this->data = $data;
  26. $this->line = $line;
  27. $this->col = $col;
  28. }
  29. public function toNode() {
  30. return new HTMLPurifier_Node_Comment($this->data, $this->line, $this->col);
  31. }
  32. }
  33. // vim: et sw=4 sts=4