- Children
- Implements
JsonSerializable Stringable
Methods |
public __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 __toString() : string Gets the comment text.
|
public getEndFilePos() : int Gets the file offset the comment ends on.
|
public getEndLine() : int Gets the line number the comment ends on.
|
public getEndTokenPos() : int Gets the token offset the comment ends on.
|
public getFilePos() : int Gets the file offset the comment started on.
|
public getLine() : int Gets the line number the comment started on.
|
public getReformattedText() Gets the reformatted comment text. "Reformatted" here means that we try to clean up the whitespace at the
|
public getStartFilePos() : int Gets the file offset the comment started on.
|
public getStartLine() : int Gets the line number the comment started on.
|
public getStartTokenPos() : int Gets the token offset the comment started on.
|
public getText() : string Gets the comment text.
|
public getTokenPos() : int Gets the token offset the comment started on.
|
public jsonSerialize() : array
|
Properties |
protected $endFilePos = NULL |
protected $endLine = NULL |
protected $endTokenPos = NULL |
protected $startFilePos = NULL |
protected $startLine = NULL |
protected $startTokenPos = NULL |
protected $text = NULL |
Methods |
private getShortestWhitespacePrefixLen(string $str) : int Get length of shortest whitespace prefix (at the start of a line). If there is a line with no prefix whitespace, 0 is a valid return value.
|