Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcDocumentWikiDocbookVisitor

Document::ezcDocumentWikiDocbookVisitor

Class ezcDocumentWikiDocbookVisitor

Docbook visitor for the Wiki AST.

Source for this file: /Document/src/document/wiki/visitor/docbook.php

ezcDocumentWikiVisitor
   |
   --ezcDocumentWikiDocbookVisitor
Version:   //autogen//

Member Variables

protected array $complexVisitMapping = array(
'ezcDocumentWikiTextNode' => 'visitText',
'ezcDocumentWikiSeparatorNode' => 'visitText',
'ezcDocumentWikiBoldNode' => 'visitEmphasisMarkup',
'ezcDocumentWikiItalicNode' => 'visitEmphasisMarkup',
'ezcDocumentWikiUnderlineNode' => 'visitEmphasisMarkup',
'ezcDocumentWikiTitleNode' => 'visitTitle',
'ezcDocumentWikiLinkNode' => 'visitLink',
'ezcDocumentWikiExternalLinkNode' => 'visitExternalLink',
'ezcDocumentWikiInternalLinkNode' => 'visitExternalLink',
'ezcDocumentWikiInterWikiLinkNode' => 'visitExternalLink',
'ezcDocumentWikiBulletListNode' => 'visitList',
'ezcDocumentWikiEnumeratedListNode' => 'visitList',
'ezcDocumentWikiImageNode' => 'visitImages',
'ezcDocumentWikiLiteralBlockNode' => 'visitLiteralBlock',
'ezcDocumentWikiInlineLiteralNode' => 'visitLiteral',
'ezcDocumentWikiTableRowNode' => 'visitTableRow',
'ezcDocumentWikiTableCellNode' => 'visitTableCell',
'ezcDocumentWikiLineBreakNode' => 'visitLineBreak',
'ezcDocumentWikiParagraphNode' => 'visitParagraph',
'ezcDocumentWikiBlockquoteNode' => 'visitBlockquote',
'ezcDocumentWikiFootnoteNode' => 'visitFootnote',
'ezcDocumentWikiPluginNode' => 'visitPlugin',

// Node markup is ignored, because there is no equivalent in docbook
'ezcDocumentWikiDeletedNode' => 'visitChildren',
)

Mapping of class names to internal visitors for the respective nodes.
protected DOMDocument $document
DOM document
protected array $simpleVisitMapping = array(
'ezcDocumentWikiSectionNode' => 'section',
'ezcDocumentWikiInlineQuoteNode' => 'quote',
'ezcDocumentWikiSuperscriptNode' => 'superscript',
'ezcDocumentWikiSubscriptNode' => 'subscript',
'ezcDocumentWikiMonospaceNode' => 'literal',
'ezcDocumentWikiBulletListItemNode' => 'listitem',
'ezcDocumentWikiEnumeratedListItemNode' => 'listitem',
'ezcDocumentWikiPageBreakNode' => 'beginpage',

'ezcDocumentWikiTableNode' => 'table',
)

Direct mapping of AST node class names to docbook element names.
protected array $skipNodes = array()
Array with nodes, which can be ignored during the transformation process, they only provide additional information during preprocessing.

Inherited Member Variables

From ezcDocumentWikiVisitor
protected ezcDocumentWikiVisitor::$ast
protected ezcDocumentWikiVisitor::$errors
protected ezcDocumentWikiVisitor::$footnoteCounter
protected ezcDocumentWikiVisitor::$footnotes
protected ezcDocumentWikiVisitor::$wiki

Method Summary

protected bool isInlineNode( $node )
Is inline node?
public mixed visit( $ast )
Docarate Wiki AST
protected void visitBlockquote( $root , $node )
Visit blockquote
protected void visitEmphasisMarkup( $root , $node )
Visit emphasis markup
protected void visitExternalLink( $root , $node )
Visit external link node
protected void visitFootnote( $root , $node )
Visit footnote
protected void visitImages( $root , $node )
Visit images
protected void visitLineBreak( $root , $node )
Visit line break
protected void visitLink( $root , $node )
Visit link node
protected void visitList( $root , $node )
Visit list
protected void visitLiteral( $root , $node )
Visit literal
protected void visitLiteralBlock( $root , $node )
Visit literal block
protected void visitNode( $root , $node )
Visit single AST node
protected void visitParagraph( $root , $node )
Visit paragraph
protected void visitPlugin( $root , $node )
Visit plugin
protected void visitTableCell( $root , $node )
Visit table cell
protected void visitTableRow( $root , $node )
Visit table row
protected void visitTitle( $root , $node )
Visit section titles

Inherited Methods

From ezcDocumentWikiVisitor
public void ezcDocumentWikiVisitor::__construct()
Create visitor from Wiki document handler.
protected void ezcDocumentWikiVisitor::addFootnote()
Add footnote
public array ezcDocumentWikiVisitor::getErrors()
Return list of errors occured during visiting the document.
public ezcDocumentWikiFootnoteNode ezcDocumentWikiVisitor::hasFootnoteTarget()
Check for internal footnote reference target
protected string ezcDocumentWikiVisitor::nodeListToString()
Node list to string
protected string ezcDocumentWikiVisitor::nodeToString()
Transform a node tree into a string
protected void ezcDocumentWikiVisitor::preProcessAst()
Pre process AST
public void ezcDocumentWikiVisitor::triggerError()
Trigger visitor error
public mixed ezcDocumentWikiVisitor::visit()
Docarate Wiki AST
protected void ezcDocumentWikiVisitor::visitChildren()
Visit children
protected void ezcDocumentWikiVisitor::visitText()
Visit text node

Methods

isInlineNode

bool isInlineNode( $node )

Is inline node?

Check if contents of the current node are a inline node

Parameters:
Name Type Description
$node DOMNode

visit

mixed visit( ezcDocumentWikiDocumentNode $ast )

Docarate Wiki AST

Visit the Wiki abstract syntax tree.

Parameters:
Name Type Description
$ast ezcDocumentWikiDocumentNode
Redefinition of:
Method Description
ezcDocumentWikiVisitor::visit() Docarate Wiki AST

visitBlockquote

void visitBlockquote( $root , ezcDocumentWikiNode $node )

Visit blockquote

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentWikiNode

visitEmphasisMarkup

void visitEmphasisMarkup( $root , ezcDocumentWikiNode $node )

Visit emphasis markup

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentWikiNode

visitExternalLink

void visitExternalLink( $root , ezcDocumentWikiNode $node )

Visit external link node

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentWikiNode

visitFootnote

void visitFootnote( $root , ezcDocumentWikiNode $node )

Visit footnote

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentWikiNode

visitImages

void visitImages( $root , ezcDocumentWikiNode $node )

Visit images

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentWikiNode

visitLineBreak

void visitLineBreak( $root , ezcDocumentWikiNode $node )

Visit line break

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentWikiNode

visitLink

void visitLink( $root , ezcDocumentWikiNode $node )

Visit link node

Docbook has no support for description of links, so that the description elements in the AST are omitted.

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentWikiNode

visitList

void visitList( $root , ezcDocumentWikiNode $node )

Visit list

Ensure stacked lists are created inside another list item.

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentWikiNode

visitLiteral

void visitLiteral( $root , ezcDocumentWikiNode $node )

Visit literal

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentWikiNode

visitLiteralBlock

void visitLiteralBlock( $root , ezcDocumentWikiNode $node )

Visit literal block

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentWikiNode

visitNode

void visitNode( $root , ezcDocumentWikiNode $node )

Visit single AST node

Visit a single AST node, may be called for each node found anywhere as child. The current position in the DOMDocument is passed by a reference to the current DOMNode, which is operated on.

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentWikiNode

visitParagraph

void visitParagraph( $root , ezcDocumentWikiNode $node )

Visit paragraph

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentWikiNode

visitPlugin

void visitPlugin( $root , ezcDocumentWikiNode $node )

Visit plugin

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentWikiNode

visitTableCell

void visitTableCell( $root , ezcDocumentWikiNode $node )

Visit table cell

Visit a table cell and additionally always create an inner paragraph.

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentWikiNode

visitTableRow

void visitTableRow( $root , ezcDocumentWikiNode $node )

Visit table row

Visit a table row and decide if it belongs into a tbody or a thead section.

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentWikiNode

visitTitle

void visitTitle( $root , ezcDocumentWikiNode $node )

Visit section titles

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentWikiNode
Documentation generated by phpDocumentor 1.4.3