Copied!
CloneableInstantiable
- Extends
- Implements
JsonSerializable Stringable
Methods |
public PhpParser\Comment::__construct(string $text, int $startLine = -1, int $startFilePos = -1, int $startTokenPos = -1, int $endLine = -1, int $endFilePos = -1, int $endTokenPos = -1) Constructs a comment node.
|
public PhpParser\Comment::__toString() : string Gets the comment text.
|
public PhpParser\Comment::getEndFilePos() : int Gets the file offset the comment ends on.
|
public PhpParser\Comment::getEndLine() : int Gets the line number the comment ends on.
|
public PhpParser\Comment::getEndTokenPos() : int Gets the token offset the comment ends on.
|
public PhpParser\Comment::getReformattedText() : string Gets the reformatted comment text. "Reformatted" here means that we try to clean up the whitespace at the starts of the lines. This is necessary because we receive the comments without leading whitespace on the first line, but with leading whitespace on all subsequent lines. Additionally, this normalizes CRLF newlines to LF newlines. |
public PhpParser\Comment::getStartFilePos() : int Gets the file offset the comment started on.
|
public PhpParser\Comment::getStartLine() : int Gets the line number the comment started on.
|
public PhpParser\Comment::getStartTokenPos() : int Gets the token offset the comment started on.
|
public PhpParser\Comment::getText() : string Gets the comment text.
|
public PhpParser\Comment::jsonSerialize() : array
|
Properties |
protected int PhpParser\Comment::$endFilePos |
protected int PhpParser\Comment::$endLine |
protected int PhpParser\Comment::$endTokenPos |
protected int PhpParser\Comment::$startFilePos |
protected int PhpParser\Comment::$startLine |
protected int PhpParser\Comment::$startTokenPos |
protected string PhpParser\Comment::$text |