BlockContext
in package
FinalYes
Our document parser contains
Table of Contents
Properties
Methods
- __construct() : mixed
- getCurrentLineNumber() : int
- 1-based line number in the source file of the current line. Once all lines have been consumed, this is the last line; for empty contents it is the line before them, e.g. the line of a directive without content.
- getDocumentIterator() : LinesIterator
- getDocumentParserContext() : DocumentParserContext
- getLineOffset() : int
- Number of lines in the source file before the line at $key of this context, to be passed on as lineOffset of a sub context whose contents start at that line.
- getLoggerInformation() : array<string, int|string>
Properties
$documentIterator read-only
private
LinesIterator
$documentIterator
$documentParserContext read-only
private
DocumentParserContext
$documentParserContext
$lineOffset read-only
private
int
$lineOffset
= 0
Methods
__construct()
public
__construct(DocumentParserContext $documentParserContext, string $contents[, bool $preserveSpace = false ][, int $lineOffset = 0 ]) : mixed
Parameters
- $documentParserContext : DocumentParserContext
- $contents : string
- $preserveSpace : bool = false
- $lineOffset : int = 0
-
Number of lines in the source file before the first line of $contents, getLineOffset() of the parent context.
getCurrentLineNumber()
1-based line number in the source file of the current line. Once all lines have been consumed, this is the last line; for empty contents it is the line before them, e.g. the line of a directive without content.
public
getCurrentLineNumber() : int
Return values
intgetDocumentIterator()
public
getDocumentIterator() : LinesIterator
Return values
LinesIteratorgetDocumentParserContext()
public
getDocumentParserContext() : DocumentParserContext
Return values
DocumentParserContextgetLineOffset()
Number of lines in the source file before the line at $key of this context, to be passed on as lineOffset of a sub context whose contents start at that line.
public
getLineOffset(int $key) : int
Parameters
- $key : int
Return values
intgetLoggerInformation()
public
getLoggerInformation() : array<string, int|string>