Context
in package
implements
ContextInterface
Maintains the current state of the Markdown parser engine
Interfaces, Classes and Traits
Table of Contents
- $blockCloser : UnmatchedBlockCloser
- $blocksParsed : bool
- $container : AbstractBlock
- $doc : Document
- $environment : EnvironmentInterface
- $line : string
- $lineNumber : int
- $referenceParser : ReferenceParser
- $tip : AbstractBlock|null
- __construct() : mixed
- addBlock() : void
- getBlockCloser() : UnmatchedBlockCloser
- Finalize and close any unmatched blocks
- getBlocksParsed() : bool
- getContainer() : AbstractBlock
- getDocument() : Document
- getLine() : string
- getLineNumber() : int
- getReferenceParser() : ReferenceParser
- getTip() : AbstractBlock|null
- replaceContainerBlock() : void
- setBlocksParsed() : $this
- setContainer() : $this
- setNextLine() : void
- setTip() : $this
Properties
$blockCloser
protected
UnmatchedBlockCloser
$blockCloser
$blocksParsed
protected
bool
$blocksParsed
= false
$container
protected
AbstractBlock
$container
$doc
protected
Document
$doc
$environment
protected
EnvironmentInterface
$environment
$line
protected
string
$line
$lineNumber
protected
int
$lineNumber
$referenceParser
protected
ReferenceParser
$referenceParser
$tip
protected
AbstractBlock|null
$tip
Methods
__construct()
public
__construct(Document $document, EnvironmentInterface $environment) : mixed
Parameters
- $document : Document
- $environment : EnvironmentInterface
Return values
mixed —addBlock()
public
addBlock(AbstractBlock $block) : void
Parameters
- $block : AbstractBlock
Return values
void —getBlockCloser()
Finalize and close any unmatched blocks
public
getBlockCloser() : UnmatchedBlockCloser
Return values
UnmatchedBlockCloser —getBlocksParsed()
public
getBlocksParsed() : bool
Return values
bool —getContainer()
public
getContainer() : AbstractBlock
Return values
AbstractBlock —getDocument()
public
getDocument() : Document
Return values
Document —getLine()
public
getLine() : string
Return values
string —getLineNumber()
public
getLineNumber() : int
Return values
int —getReferenceParser()
public
getReferenceParser() : ReferenceParser
Return values
ReferenceParser —getTip()
public
getTip() : AbstractBlock|null
Return values
AbstractBlock|null —replaceContainerBlock()
public
replaceContainerBlock(AbstractBlock $replacement) : void
Parameters
- $replacement : AbstractBlock
Return values
void —setBlocksParsed()
public
setBlocksParsed(bool $bool) : $this
Parameters
- $bool : bool
Return values
$this —setContainer()
public
setContainer(AbstractBlock $container) : $this
Parameters
- $container : AbstractBlock
Return values
$this —setNextLine()
public
setNextLine(string $line) : void
Parameters
- $line : string
Return values
void —setTip()
public
setTip(AbstractBlock|null $block) : $this
Parameters
- $block : AbstractBlock|null