php-parser/lib/PHPParser/Comment.php
nikic e587e3f4c6 Collect normal comments too, not only doc comments
Comments and doc comments are now saved in the 'comments' attribute, as an
array. The are instances of PHPParser_Comment[_Doc].
2012-05-06 17:49:04 +02:00

42 lines
876 B
PHP

<?php
class PHPParser_Comment
{
protected $text;
/**
* Constructs a comment node.
*
* @param string $text Comment text (including comment delimiters like /*)
*/
public function __construct($text) {
$this->text = $text;
}
/**
* Gets the comment text.
*
* @return string The comment text (including comment delimiters like /*)
*/
public function getText() {
return $this->text;
}
/**
* Sets the comment text.
*
* @param string $text The comment text (including comment delimiters like /*)
*/
public function setText($text) {
$this->text = $text;
}
/**
* Gets the comment text.
*
* @return string The comment text (including comment delimiters like /*)
*/
public function __toString() {
return $this->text;
}
}