$rst
$rst : \phpDocumentor\Plugin\Scrybe\Converter\RestructuredText\Document
A specialized RestructuredText Parser/Visitor to aid in the discovery phase.
This class collects all headings and their titles and populates the TableOfContents collection.
$rst : \phpDocumentor\Plugin\Scrybe\Converter\RestructuredText\Document
$entry_pointers : array<mixed,\phpDocumentor\Plugin\Scrybe\Converter\Metadata\TableOfContents\Heading>
This array is meant as a cache of the last entry per depth.
To build a hierarchy from a non-recursive method, such as visitSection(), you need a way to reference the last Entry per depth.
By keeping track of these pointers you know onto which parent you will need to add a node by checking which of higher depth was parsed last.
Important: because it is possible that levels are 'skipped' we will need to unset all 'deeper' depths when setting a new one. Otherwise we might inadvertently add an entry to the wrong tree.
$last_heading : \phpDocumentor\Plugin\Scrybe\Converter\Metadata\TableOfContents\Heading
This is a pointer to the last discovered heading.
Directives and roles may 'include' Files as children of the currently parsed heading. Elements as the toctree directive or a plain include are examples of such.
getDocument() : \phpDocumentor\Plugin\Scrybe\Converter\RestructuredText\Document
Returns the RestructuredText Document to retrieve the specialized cross-document collections.
addFileToLastHeading(\phpDocumentor\Plugin\Scrybe\Converter\Metadata\TableOfContents\File $file)
Adds a TableOfContents File object to the last heading that was discovered.
This may be used by roles or directives to insert an include file into the TableOfContents and thus all its headings.
This method is explicitly bound to File objects and not other BaseEntry descendents because inline elements such as headings should also modify the internal pointers for this visitor.
\phpDocumentor\Plugin\Scrybe\Converter\Metadata\TableOfContents\File | $file |
visitSection(\DOMNode $root, \ezcDocumentRstNode $node) : void
Visitor for the section heading used to populate the TableOfContents.
This method interprets the heading and its containing text and adds new entries to the TableOfContents object in the RestructuredText document.
\DOMNode | $root | |
\ezcDocumentRstNode | $node |