Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcDocumentBBCodeDocbookVisitor

Document::ezcDocumentBBCodeDocbookVisitor

Class ezcDocumentBBCodeDocbookVisitor

Docbook visitor for the BBCode AST.

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

ezcDocumentBBCodeVisitor
   |
   --ezcDocumentBBCodeDocbookVisitor
Version:   //autogen//

Member Variables

protected DOMDocument $document
DOM document
protected array $visitMapping = array(
'ezcDocumentBBCodeParagraphNode' => 'visitParagraph',
'ezcDocumentBBCodeTextNode' => 'visitText',
'ezcDocumentBBCodeTagNode' => 'visitTag',
'ezcDocumentBBCodeInlineLiteralNode' => 'visitInlineLiteral',
'ezcDocumentBBCodeLiteralBlockNode' => 'visitLiteralBlock',
'ezcDocumentBBCodeBulletListNode' => 'visitBulletList',
'ezcDocumentBBCodeEnumeratedListNode' => 'visitEnumeratedList',
)

Mapping of AST nodes to the visitor methods, which are sued to transform the respective node into Docbook

Inherited Member Variables

From ezcDocumentBBCodeVisitor
protected ezcDocumentBBCodeVisitor::$ast
protected ezcDocumentBBCodeVisitor::$bbcode
protected ezcDocumentBBCodeVisitor::$errors

Method Summary

public mixed visit( $ast )
Docarate BBCode AST
protected void visitBulletList( $root , $node )
Visit bullet list
protected void visitEnumeratedList( $root , $node )
Visit enumerated list
protected void visitInlineLiteral( $root , $node )
Visit inlien literal markup
protected void visitListItems( $list , $node )
Visit list items in a list
protected void visitLiteralBlock( $root , $node )
Visit literal block markup
public void visitNode( $root , $node )
Visit single AST node
protected void visitParagraph( $root , $node )
Visit paragraph markup
protected void visitTag( $root , $node )
Visit simple BBCode tag

Inherited Methods

From ezcDocumentBBCodeVisitor
public void ezcDocumentBBCodeVisitor::__construct()
Create visitor from BBCode document handler.
public array ezcDocumentBBCodeVisitor::getErrors()
Return list of errors occured during visiting the document.
public void ezcDocumentBBCodeVisitor::triggerError()
Trigger visitor error
public mixed ezcDocumentBBCodeVisitor::visit()
Docarate BBCode AST
protected void ezcDocumentBBCodeVisitor::visitText()
Visit text node

Methods

visit

mixed visit( ezcDocumentBBCodeDocumentNode $ast )

Docarate BBCode AST

Visit the BBCode abstract syntax tree.

Parameters:
Name Type Description
$ast ezcDocumentBBCodeDocumentNode
Redefinition of:
Method Description
ezcDocumentBBCodeVisitor::visit() Docarate BBCode AST

visitBulletList

void visitBulletList( $root , ezcDocumentBBCodeNode $node )

Visit bullet list

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentBBCodeNode

visitEnumeratedList

void visitEnumeratedList( $root , ezcDocumentBBCodeNode $node )

Visit enumerated list

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentBBCodeNode

visitInlineLiteral

void visitInlineLiteral( $root , ezcDocumentBBCodeNode $node )

Visit inlien literal markup

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentBBCodeNode

visitListItems

void visitListItems( $list , ezcDocumentBBCodeListNode $node )

Visit list items in a list

Parameters:
Name Type Description
$list DOMNode
$node ezcDocumentBBCodeListNode

visitLiteralBlock

void visitLiteralBlock( $root , ezcDocumentBBCodeNode $node )

Visit literal block markup

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentBBCodeNode

visitNode

void visitNode( $root , ezcDocumentBBCodeNode $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 ezcDocumentBBCodeNode

visitParagraph

void visitParagraph( $root , ezcDocumentBBCodeNode $node )

Visit paragraph markup

Parameters:
Name Type Description
$root DOMNode
$node ezcDocumentBBCodeNode

visitTag

void visitTag( $root , ezcDocumentBBCodeNode $node )

Visit simple BBCode tag

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