Comment.php 725 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Concrete comment node class.
  4. */
  5. class HTMLPurifier_Node_Comment extends HTMLPurifier_Node
  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 toTokenPair() {
  30. return array(new HTMLPurifier_Token_Comment($this->data, $this->line, $this->col), null);
  31. }
  32. }