DocumentParser
in package
Table of Contents
- $buffer : Buffer
- $directive : Directive|null
- $directives : array<string|int, Directive>
- $document : DocumentNode
- $environment : Environment
- $eventManager : EventManager
- $isCode : bool
- $lastTitleNode : TitleNode
- $lineChecker : LineChecker
- $lineDataParser : LineDataParser
- $lines : Lines
- $listFlow : bool
- $listLine : ListLine|null
- $nodeBuffer : Node|null
- $openTitleNodes : array<string|int, TitleNode>
- $parser : Parser
- $specialLetter : false|string|null
- $state : string
- $tableParser : TableParser
- __construct() : mixed
- getDocument() : DocumentNode
- mergeIncludedFiles() : string
- parse() : DocumentNode
- createLines() : Lines
- endOpenSection() : void
- flush() : void
- getCurrentDirective() : Directive|null
- hasBuffer() : bool
- init() : void
- initDirective() : bool
- isDirectiveOption() : bool
- parseLine() : bool
- parseLines() : void
- parseLink() : bool
- parseListLine() : bool
- prepareCode() : bool
- prepareDocument() : string
- setState() : void
Properties
$buffer
private
Buffer
$buffer
$directive
private
Directive|null
$directive
$directives
private
array<string|int, Directive>
$directives
$document
private
DocumentNode
$document
$environment
private
Environment
$environment
$eventManager
private
EventManager
$eventManager
$isCode
private
bool
$isCode
= false
$lastTitleNode
private
TitleNode
$lastTitleNode
$lineChecker
private
LineChecker
$lineChecker
$lineDataParser
private
LineDataParser
$lineDataParser
$lines
private
Lines
$lines
$listFlow
private
bool
$listFlow
= false
$listLine
private
ListLine|null
$listLine
$nodeBuffer
private
Node|null
$nodeBuffer
$openTitleNodes
private
array<string|int, TitleNode>
$openTitleNodes
= []
$parser
private
Parser
$parser
$specialLetter
private
false|string|null
$specialLetter
$state
private
string
$state
$tableParser
private
TableParser
$tableParser
Methods
__construct()
public
__construct(Parser $parser, EventManager $eventManager, array<string|int, Directive> $directives) : mixed
Parameters
- $parser : Parser
- $eventManager : EventManager
- $directives : array<string|int, Directive>
Return values
mixed —getDocument()
public
getDocument() : DocumentNode
Return values
DocumentNode —mergeIncludedFiles()
public
mergeIncludedFiles(string $document) : string
Parameters
- $document : string
Return values
string —parse()
public
parse(string $contents) : DocumentNode
Parameters
- $contents : string
Return values
DocumentNode —createLines()
private
createLines(string $document) : Lines
Parameters
- $document : string
Return values
Lines —endOpenSection()
private
endOpenSection(TitleNode $titleNode) : void
Parameters
- $titleNode : TitleNode
Return values
void —flush()
private
flush() : void
Return values
void —getCurrentDirective()
private
getCurrentDirective() : Directive|null
Return values
Directive|null —hasBuffer()
private
hasBuffer() : bool
Return values
bool —init()
private
init() : void
Return values
void —initDirective()
private
initDirective(string $line) : bool
Parameters
- $line : string
Return values
bool —isDirectiveOption()
private
isDirectiveOption(string $line) : bool
Parameters
- $line : string
Return values
bool —parseLine()
private
parseLine(string $line) : bool
Parameters
- $line : string
Return values
bool —parseLines()
private
parseLines(string $document) : void
Parameters
- $document : string
Return values
void —parseLink()
private
parseLink(string $line) : bool
Parameters
- $line : string
Return values
bool —parseListLine()
private
parseListLine(string|null $line[, bool $flush = false ]) : bool
Parameters
- $line : string|null
- $flush : bool = false
Return values
bool —prepareCode()
private
prepareCode() : bool
Return values
bool —prepareDocument()
private
prepareDocument(string $document) : string
Parameters
- $document : string
Return values
string —setState()
private
setState(string $state) : void
Parameters
- $state : string