Document: ezcDocumentBBCode
[ ]
[ Conversion ] [ Styles ]
[ ]
[ ]
[ ]
[ ]
Class: ezcDocumentBBCode
|
Document handler for BBCode text documents. [
source]
Implemented Interfaces
BBCode are common in forum software and only provide a very basic set of markup directives. The implemented BBCode handler focusses on the BBCode implementation in the most common forum software: phpBB.
Just like in the forum software it can be extended with custom BBCode definitions.
Parents
ezcDocument
|
--ezcDocumentBBCode
Member Variables
|
protected ezcDocumentBBCodeDocumentNode |
$ast
Asbtract syntax tree.
The internal representation of BBCode documents. |
|
protected string |
$contents
Plain BBCode contents as a string |
|
protected array |
$plugins
= array( )
Registered plugins
Plugins are the best entry point for custom BBCodes, so you may register custom plugin classes using the class method registerPlugin(). |
Inherited Member Variables
From
ezcDocument:
Method Summary
Inherited Methods
From
ezcDocument :
Methods
createFromDocbook
Create document from docbook document
A document of the docbook format is provided and the internal document structure should be created out of this.
This method is required for all formats to have one central format, so that each format can be compiled into each other format using docbook as an intermediate format.
You may of course just call an existing converter for this conversion.
Parameters
Redefinition of
getAsDocbook
Return document compiled to the docbook format
The internal document structure is compiled to the docbook format and the resulting docbook document is returned.
This method is required for all formats to have one central format, so that each format can be compiled into each other format using docbook as an intermediate format.
You may of course just call an existing converter for this conversion.
Redefinition of
getPluginHandler
string getPluginHandler(
string
$name )
Get plugin handler
Get plugin handler class name for the specified name.
Parameters
| Name |
Type |
Description |
$name |
string |
|
loadString
void loadString(
string
$string )
Create document from input string
Create a document of the current type handler class and parse it into a usable internal structure.
Parameters
| Name |
Type |
Description |
$string |
string |
|
Redefinition of
registerPlugin
void registerPlugin(
string
$name, string
$class )
Register plugin handler
Register a custom plugin handler for special plugins or overwrite existing plugin handlers. The plugins are specified by its (lowercase) name and the class name, which should handle the plugin and extend from ezcDocumentBBCodePlugin.
Parameters
| Name |
Type |
Description |
$name |
string |
|
$class |
string |
|
save
string save(
)
Return document as string
Serialize the document to a string an return it.
Redefinition of
validateFile
mixed validateFile(
string
$file )
Validate the input file
Validate the input file against the specification of the current document format.
Returns true, if the validation succeded, and an array with ezcDocumentValidationError objects otherwise.
Parameters
| Name |
Type |
Description |
$file |
string |
|
validateString
mixed validateString(
string
$string )
Validate the input string
Validate the input string against the specification of the current document format.
Returns true, if the validation succeded, and an array with ezcDocumentValidationError objects otherwise.
Parameters
| Name |
Type |
Description |
$string |
string |
|
Last updated: Tue, 23 Mar 2010