Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcDocumentBBCodeVisitor

Document::ezcDocumentBBCodeVisitor

Class ezcDocumentBBCodeVisitor

Abstract visitor base for BBCode documents represented by the parser AST.

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

Implements interfaces:

Version:   //autogen//

Descendants

Child Class Description
ezcDocumentBBCodeDocbookVisitor Docbook visitor for the BBCode AST.

Member Variables

protected ezcDocumentBBCodeDocumentNode $ast
Reference to the AST root node.
protected ezcDocumentBBCode $bbcode
BBCode document
protected array $errors = array()
Aggregated minor errors during document processing.

Method Summary

public void __construct( $document , $path )
Create visitor from BBCode document handler.
public array getErrors( )
Return list of errors occured during visiting the document.
public void triggerError( $level , $message , [ $file = null] , [ $line = null] , [ $position = null] )
Trigger visitor error
public mixed visit( $ast )
Docarate BBCode AST
protected void visitText( $root , $node )
Visit text node

Methods

__construct

void __construct( ezcDocumentBBCode $document , string $path )

Create visitor from BBCode document handler.

Parameters:
Name Type Description
$document ezcDocumentBBCode
$path string

getErrors

array getErrors( )

Return list of errors occured during visiting the document.

May be an empty array, if on errors occured, or a list of ezcDocumentVisitException objects.

Implementation of:
Method Description
ezcDocumentErrorReporting::getErrors() Return list of errors occured during visiting the document.

triggerError

void triggerError( int $level , string $message , [string $file = null] , [int $line = null] , [int $position = null] )

Trigger visitor error

Emit a vistitor error, and convert it to an exception depending on the error reporting settings.

Parameters:
Name Type Description
$level int
$message string
$file string
$line int
$position int
Implementation of:
Method Description
ezcDocumentErrorReporting::triggerError() Trigger parser error.

visit

mixed visit( ezcDocumentBBCodeDocumentNode $ast )

Docarate BBCode AST

Visit the BBCode abstract syntax tree.

Parameters:
Name Type Description
$ast ezcDocumentBBCodeDocumentNode
Redefined in descendants as:
Method Description
ezcDocumentBBCodeDocbookVisitor::visit() Docarate BBCode AST 

visitText

void visitText( $root , ezcDocumentBBCodeNode $node )

Visit text node

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