Document: ezcDocumentRstDirective
[ ]
[ Conversion ] [ Styles ]
[ ]
[ ]
[ ]
[ ]
Class: ezcDocumentRstDirective
|
Visitor for RST directives [
source]
Descendents
Member Variables
|
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. |
Method Summary
|
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 |
Methods
__construct
void __construct(
$ast, string
$path,
$node )
Construct directive from AST and node
Parameters
| Name |
Type |
Description |
$ast |
ezcDocumentRstDocumentNode |
|
$path |
string |
|
$node |
ezcDocumentRstDirectiveNode |
|
parseTokens
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.
Parameters
setSourceVisitor
Set the calling vaisitor
Pass the visitor which called the rendering function on the directive for optional reference.
Parameters
toDocbook
void toDocbook(
$document,
$root )
Transform directive to docbook
Create a docbook XML structure at the directives position in the document.
Parameters
| Name |
Type |
Description |
$document |
DOMDocument |
|
$root |
DOMElement |
|
Redefined in descendants as
Last updated: Tue, 23 Mar 2010