MarkupLanguageParser
in package
implements
MarkupLanguageParser
Table of Contents
Interfaces
Properties
- $documentParser : DocumentParserContext|null
- $documentParserContextFactory : DocumentParserContextFactory
- $filename : string|null
- $parserContext : ParserContext|null
- $startingRule : Rule
Methods
- __construct() : mixed
- getDocument() : DocumentNode
- getFilename() : string
- getParserContext() : ParserContext
- getSubParser() : MarkupLanguageParser
- parse() : DocumentNode
- supports() : bool
Properties
$documentParser
private
DocumentParserContext|null
$documentParser
= null
$documentParserContextFactory read-only
private
DocumentParserContextFactory
$documentParserContextFactory
$filename
private
string|null
$filename
= null
$parserContext
private
ParserContext|null
$parserContext
= null
$startingRule read-only
private
Rule
$startingRule
Methods
__construct()
public
__construct(Rule<string|int, DocumentNode> $startingRule, DocumentParserContextFactory $documentParserContextFactory) : mixed
Parameters
- $startingRule : Rule<string|int, DocumentNode>
- $documentParserContextFactory : DocumentParserContextFactory
getDocument()
public
getDocument() : DocumentNode
Return values
DocumentNodegetFilename()
public
getFilename() : string
Return values
stringgetParserContext()
public
getParserContext() : ParserContext
Return values
ParserContextgetSubParser()
public
getSubParser() : MarkupLanguageParser
one should use injected rules in a rule. Not subparsers
Return values
MarkupLanguageParserparse()
public
parse(ParserContext $parserContext, string $contents) : DocumentNode
Parameters
- $parserContext : ParserContext
- $contents : string
Return values
DocumentNodesupports()
public
supports(string $inputFormat) : bool
Parameters
- $inputFormat : string