Guides

BlockContext
in package

FinalYes

Our document parser contains

Table of Contents

Properties

$documentIterator  : LinesIterator
$documentParserContext  : DocumentParserContext
$lineOffset  : int

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

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
int

getLineOffset()

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
int

getLoggerInformation()

public getLoggerInformation() : array<string, int|string>
Return values
array<string, int|string>
On this page

Search results