ConfvalDirective
extends SubDirective
in package
FinalYes
The confval directive configuration values.
https://sphinx-toolbox.readthedocs.io/en/stable/extensions/confval.html
Table of Contents
Constants
- NAME = 'confval'
Properties
- $startingRule : Rule
- $anchorReducer : AnchorNormalizer
- $inlineParser : InlineParser
- $logger : LoggerInterface|null
Methods
- __construct() : mixed
- getAliases() : array<string|int, string>
- Allow a directive to be registered under multiple names.
- getName() : string
- Get the directive name
- process() : Node|null
- This is the function called by the parser to process the directive, it can be overloaded to do anything with the document, like tweaking nodes or change the parser context
- processNode() : Node
- This can be overloaded to write a directive that just create one node for the document, which is common
- getStartingRule() : Rule<string|int, CollectionNode>
- optionsToArray() : array<string, scalar|null>
- processSub() : Node|null
Constants
NAME
public
mixed
NAME
= 'confval'
Properties
$startingRule
protected
Rule
$startingRule
$anchorReducer read-only
private
AnchorNormalizer
$anchorReducer
$inlineParser read-only
private
InlineParser
$inlineParser
$logger read-only
private
LoggerInterface|null
$logger
= null
Methods
__construct()
public
__construct(Rule<string|int, CollectionNode> $startingRule, GenericLinkProvider $genericLinkProvider, AnchorNormalizer $anchorReducer, InlineParser $inlineParser[, LoggerInterface|null $logger = null ]) : mixed
Parameters
- $startingRule : Rule<string|int, CollectionNode>
- $genericLinkProvider : GenericLinkProvider
- $anchorReducer : AnchorNormalizer
- $inlineParser : InlineParser
- $logger : LoggerInterface|null = null
getAliases()
Allow a directive to be registered under multiple names.
public
getAliases() : array<string|int, string>
Aliases can be used for directives whose name has been deprecated or allows for multiple spellings.
Return values
array<string|int, string>getName()
Get the directive name
public
getName() : string
Return values
stringprocess()
This is the function called by the parser to process the directive, it can be overloaded to do anything with the document, like tweaking nodes or change the parser context
public
final process(BlockContext $blockContext, Directive $directive) : Node|null
Parameters
- $blockContext : BlockContext
-
the current document context with the content of the directive
- $directive : Directive
-
parsed directive containing options and variable
Return values
Node|nullprocessNode()
This can be overloaded to write a directive that just create one node for the document, which is common
public
processNode(BlockContext $blockContext, Directive $directive) : Node
The arguments are the same that process
Parameters
- $blockContext : BlockContext
- $directive : Directive
Return values
NodegetStartingRule()
protected
getStartingRule() : Rule<string|int, CollectionNode>
Return values
Rule<string|int, CollectionNode>optionsToArray()
protected
optionsToArray(array<string|int, DirectiveOption> $options) : array<string, scalar|null>
Parameters
- $options : array<string|int, DirectiveOption>
Return values
array<string, scalar|null>processSub()
protected
processSub(BlockContext $blockContext, CollectionNode $collectionNode, Directive $directive) : Node|null
Parameters
- $blockContext : BlockContext
- $collectionNode : CollectionNode
- $directive : Directive