eNTiDi\Autotoc\Tocifier
Synopsis
class Tocifier
{
- // members
- public static string $prefix = 'TOC-';
- private string $raw_html = '';
- private string $html = '';
- private $tree;
- private array $dangling = ;
- private $augment_callback;
- // methods
- private array getParent()
- private string getPlainText()
- private array newNode()
- private void processDocument()
- private void dumpBranch()
- public void __construct()
- public void setAugmentCallback()
- public boolean process()
- public Array getTOC()
- public String getHtml()
- public void dumpTOC()
- public static void prependAnchor()
- public static void setId()
Members
private
- $augment_callback
- $dangling
- $html
- $raw_html
- $tree
public
- $prefix
Methods
private
- dumpBranch() — Debug function for dumping a TOC node and its children.
- getParent() — Get the TOC node closest to a given nesting level.
- getPlainText() — Get the plain text content from a DOM element.
- newNode() — Create a new TOC node.
- processDocument() — Process the specific document.
public
- __construct() — Create a new TOCifier instance.
- dumpTOC() — Dump the TOC to stdout for debugging purpose.
- getHtml() — Get the HTML augmented for proper navigation.
- getTOC() — Get the TOC (Table Of Contents) from the provided HTML.
- prependAnchor() — Augment a DOMElement by prepending an anchor.
- process() — Parse and process the HTML chunk.
- setAugmentCallback() — Change the augment method used by this Tocifier instance.
- setId() — Augment a DOMElement by setting its ID.