Abstract visitor base for BBCode documents represented by the parser AST.
Source for this file: /Document/src/document/bbcode/visitor.php
Version: | //autogen// |
Child Class | Description |
---|---|
ezcDocumentBBCodeDocbookVisitor | Docbook visitor for the BBCode AST. |
protected ezcDocumentBBCodeDocumentNode |
$ast
Reference to the AST root node. |
protected ezcDocumentBBCode |
$bbcode
BBCode document |
protected array |
$errors
= array()
Aggregated minor errors during document processing. |
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 |
Create visitor from BBCode document handler.
Name | Type | Description |
---|---|---|
$document |
ezcDocumentBBCode | |
$path |
string |
Return list of errors occured during visiting the document.
May be an empty array, if on errors occured, or a list of ezcDocumentVisitException objects.
Method | Description |
---|---|
ezcDocumentErrorReporting::getErrors() |
Return list of errors occured during visiting the document. |
Trigger visitor error
Emit a vistitor error, and convert it to an exception depending on the error reporting settings.
Name | Type | Description |
---|---|---|
$level |
int | |
$message |
string | |
$file |
string | |
$line |
int | |
$position |
int |
Method | Description |
---|---|
ezcDocumentErrorReporting::triggerError() |
Trigger parser error. |
Docarate BBCode AST
Visit the BBCode abstract syntax tree.
Name | Type | Description |
---|---|---|
$ast |
ezcDocumentBBCodeDocumentNode |
Method | Description |
---|---|
ezcDocumentBBCodeDocbookVisitor::visit() |
Docarate BBCode AST |
Visit text node
Name | Type | Description |
---|---|---|
$root |
DOMNode | |
$node |
ezcDocumentBBCodeNode |