Documentation

ParagraphParser extends AbstractBlockContinueParser
in package
implements BlockContinueParserWithInlinesInterface

FinalYes

Base class for a block parser

Slightly more convenient to extend from vs. implementing the interface

Table of Contents

Interfaces

BlockContinueParserWithInlinesInterface
Interface for a block continuation parser

Properties

$block  : Paragraph
$referenceParser  : ReferenceParser

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()  : Paragraph
Return the current block being parsed by this parser
getContentString()  : string
getReferences()  : array<string|int, ReferenceInterface>
isContainer()  : bool
Return whether we are parsing a container block
parseInlines()  : void
Parse any inlines inside of the current block
tryContinue()  : BlockContinue|null
Attempt to parse the given line

Properties

Methods

addLine()

Add the given line of text to the current block

public addLine(string $line) : void
Parameters
$line : string

canHaveLazyContinuationLines()

Return whether we are interested in possibly lazily parsing any subsequent lines

public canHaveLazyContinuationLines() : bool
Return values
bool

closeBlock()

Close and finalize the current block

public closeBlock() : void

getContentString()

public getContentString() : string
Return values
string

        
On this page

Search results