Document: ezcDocumentRst
[ ]
[ Conversion ]
[ ]
[ ]
[ ]
[ ]
Class: ezcDocumentRst
|
Document handler for RST text documents. [
source]
Implemented Interfaces
Parents
ezcDocument
|
--ezcDocumentRst
Member Variables
|
protected ezcDocumentRstDocumentNode |
$ast
Asbtract syntax tree.
The internal representation of RST documents. |
|
protected string |
$contents
Plain RST contents as a string |
|
protected array |
$directives
= array( 'include' => 'ezcDocumentRstIncludeDirective', 'contents' => 'ezcDocumentRstContentsDirective', 'image' => 'ezcDocumentRstImageDirective', 'figure' => 'ezcDocumentRstFigureDirective', 'attention' => 'ezcDocumentRstAttentionDirective', 'warning' => 'ezcDocumentRstWarningDirective', 'danger' => 'ezcDocumentRstDangerDirective', 'notice' => 'ezcDocumentRstNoticeDirective', 'note' => 'ezcDocumentRstNoteDirective', )
Registered directives
Directives are special RST element, which are documented at: http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#directives Directives are the best entry point for custom rules, and you may register custom directive classes using the class method registerDirective(). |
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
getAsXhtml
Return document compiled to the HTML format
The internal document structure is compiled to the HTML format and the resulting HTML document is returned.
This is an optional interface for document markup languages which support a direct transformation to HTML as a shortcut.
getDirectiveHandler
string getDirectiveHandler(
string
$name )
Get directive handler
Get directive 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
registerDirective
void registerDirective(
string
$name, string
$class )
Register directive handler
Register a custom directive handler for special directives or overwrite existing directive handlers. The directives are specified by its (lowercase) name and the class name, which should handle the directive and extend from ezcDocumentRstDirective.
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, 02 Dec 2008