Visitor for RST directives
Source for this file: /Document/src/document/rst/directive.php
Version: | //autogen// |
Child Class | Description |
---|---|
ezcDocumentRstAttentionDirective | Visitor for RST important directives |
ezcDocumentRstIncludeDirective | Visitor for RST include directives |
ezcDocumentRstWarningDirective | Visitor for RST warning directives |
ezcDocumentRstNoticeDirective | Visitor for RST tip directives |
ezcDocumentRstContentsDirective | Visitor for RST contents directives |
ezcDocumentRstNoteDirective | Visitor for RST note directives |
ezcDocumentRstImageDirective | Visitor for RST image directives |
ezcDocumentRstDangerDirective | Visitor for RST danger directives |
protected ezcDocumentRstDocumentNode |
$ast
Complete RST abstract syntax tree, if this is necessary to render the directive. |
protected ezcDocumentRstDirectiveNode |
$node
Current directive RST AST node. |
protected string |
$path
Current document base path, especially relevant for file inclusions. |
protected ezcDocumentRstVisitor |
$visitor
The calling visitor. |
public void |
__construct(
$ast
, $path
, $node
)
Construct directive from AST and node |
protected DOMDocument |
parseTokens(
$tokens
, $visitor
)
Parse directive token list with RST parser |
public void |
setSourceVisitor(
$visitor
)
Set the calling vaisitor |
public abstract void |
toDocbook(
$document
, $root
)
Transform directive to docbook |
Construct directive from AST and node
Name | Type | Description |
---|---|---|
$ast |
ezcDocumentRstDocumentNode | |
$path |
string | |
$node |
ezcDocumentRstDirectiveNode |
Parse directive token list with RST parser
This method is intended to parse the token list, provided for the RST contents using the standard RST parser. It will be visited afterwards by the provided RST-visitor implementation.
The method returns the created document as a DOMDocument. You normally need to use DOMDocument::importNode to embed the conatined nodes in your target document.
Name | Type | Description |
---|---|---|
$tokens |
array | |
$visitor |
ezcDocumentRstVisitor |
Set the calling vaisitor
Pass the visitor which called the rendering function on the directive for optional reference.
Name | Type | Description |
---|---|---|
$visitor |
ezcDocumentRstVisitor |
Transform directive to docbook
Create a docbook XML structure at the directives position in the document.
Name | Type | Description |
---|---|---|
$document |
DOMDocument | |
$root |
DOMElement |
Method | Description |
---|---|
ezcDocumentRstAttentionDirective::toDocbook() |
Transform directive to docbook |
ezcDocumentRstIncludeDirective::toDocbook() |
Transform directive to docbook |
ezcDocumentRstWarningDirective::toDocbook() |
Transform directive to docbook |
ezcDocumentRstNoticeDirective::toDocbook() |
Transform directive to docbook |
ezcDocumentRstContentsDirective::toDocbook() |
Transform directive to docbook |
ezcDocumentRstNoteDirective::toDocbook() |
Transform directive to docbook |
ezcDocumentRstImageDirective::toDocbook() |
Transform directive to docbook |
ezcDocumentRstFigureDirective::toDocbook() |
Transform directive to docbook |
ezcDocumentRstDangerDirective::toDocbook() |
Transform directive to docbook |