AttributesBlockContinueParser
extends AbstractBlockContinueParser
in package
FinalYes
Base class for a block parser
Slightly more convenient to extend from vs. implementing the interface
Table of Contents
Properties
- $block : Attributes
- $container : AbstractBlock
- $hasSubsequentLine : bool
Methods
- __construct() : mixed
- addLine() : void
- Add the given line of text to the current block
- canContain() : bool
- Determine whether the current block being parsed can contain the given child block
- canHaveLazyContinuationLines() : bool
- Return whether we are interested in possibly lazily parsing any subsequent lines
- closeBlock() : void
- Close and finalize the current block
- getBlock() : AbstractBlock
- Return the current block being parsed by this parser
- isContainer() : bool
- Return whether we are parsing a container block
- tryContinue() : BlockContinue|null
- Attempt to parse the given line
Properties
$block
private
Attributes
$block
$container
private
AbstractBlock
$container
$hasSubsequentLine
private
bool
$hasSubsequentLine
= false
Methods
__construct()
public
__construct(array<string, mixed> $attributes, AbstractBlock $container) : mixed
Parameters
- $attributes : array<string, mixed>
-
The attributes identified by the block start parser
- $container : AbstractBlock
-
The node we were in when these attributes were discovered
addLine()
Add the given line of text to the current block
public
addLine(string $line) : void
Parameters
- $line : string
canContain()
Determine whether the current block being parsed can contain the given child block
public
canContain(AbstractBlock $childBlock) : bool
Parameters
- $childBlock : AbstractBlock
Return values
boolcanHaveLazyContinuationLines()
Return whether we are interested in possibly lazily parsing any subsequent lines
public
canHaveLazyContinuationLines() : bool
Return values
boolcloseBlock()
Close and finalize the current block
public
closeBlock() : void
getBlock()
Return the current block being parsed by this parser
public
getBlock() : AbstractBlock
Return values
AbstractBlockisContainer()
Return whether we are parsing a container block
public
isContainer() : bool
Return values
booltryContinue()
Attempt to parse the given line
public
tryContinue(Cursor $cursor, BlockContinueParserInterface $activeBlockParser) : BlockContinue|null
Parameters
- $cursor : Cursor
- $activeBlockParser : BlockContinueParserInterface