\phpDocumentor\Guides\RestructuredText\LaTeX\DirectivesWrap

Wraps a sub document in a div with a given class

Summary

Methods
Properties
Constants
process()
processSub()
wantCode()
getName()
processNode()
processAction()
finalize()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

process()

process(\phpDocumentor\Guides\RestructuredText\Parser  $parser, \phpDocumentor\Guides\Nodes\Node|null  $node, string  $variable, string  $data, string[]  $options) : void

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 environment

The node that directly follows the directive is also passed to it

Parameters

\phpDocumentor\Guides\RestructuredText\Parser $parser

the calling parser

\phpDocumentor\Guides\Nodes\Node|null $node

the node that follows the directive

string $variable

the variable name of the directive

string $data

the data of the directive (following ::)

string[] $options

the array of options for this directive

processSub()

processSub(\phpDocumentor\Guides\RestructuredText\Parser  $parser, ?\phpDocumentor\Guides\Nodes\Node  $document, string  $variable, string  $data, string[]  $options) : ?\phpDocumentor\Guides\Nodes\Node

Parameters

\phpDocumentor\Guides\RestructuredText\Parser $parser
?\phpDocumentor\Guides\Nodes\Node $document
string $variable
string $data
string[] $options

Returns

?\phpDocumentor\Guides\Nodes\Node —

wantCode()

wantCode() : bool

Should the following block be passed as a CodeNode?

Returns

bool —

getName()

getName() : string

Returns

string —

processNode()

processNode(\phpDocumentor\Guides\RestructuredText\Parser  $parser, string  $variable, string  $data, string[]  $options) : \phpDocumentor\Guides\Nodes\Node

This can be overloaded to write a directive that just create one node for the document, which is common

The arguments are the same that process

Parameters

\phpDocumentor\Guides\RestructuredText\Parser $parser
string $variable
string $data
string[] $options

Returns

\phpDocumentor\Guides\Nodes\Node —

processAction()

processAction(\phpDocumentor\Guides\RestructuredText\Parser  $parser, string  $variable, string  $data, string[]  $options) : void

This can be overloaded to write a directive that just do an action without changing the nodes of the document

The arguments are the same that process

Parameters

\phpDocumentor\Guides\RestructuredText\Parser $parser
string $variable
string $data
string[] $options

finalize()

finalize(\phpDocumentor\Guides\Nodes\DocumentNode  $document) : void

Called at the end of the parsing to finalize the document (add something or tweak nodes)

Parameters

\phpDocumentor\Guides\Nodes\DocumentNode $document