Document: ezcDocumentDocbookToRstConverter
[ ]
[ Conversion ] [ Styles ]
[ ]
[ ]
[ ]
[ ]
Class: ezcDocumentDocbookToRstConverter
|
Converter for docbook to Rst with a PHP callback based mechanism, for fast and easy PHP based extensible transformations. [
source]
This converter does not support the full docbook standard, but only a subset commonly used in the document component. If you need to transform documents using the full docbook you might prefer to use the ezcDocumentDocbookToRstXsltConverter with the default stylesheet from Welsh.
Parents
ezcDocumentConverter
|
--ezcDocumentElementVisitorConverter
|
--ezcDocumentDocbookToRstConverter
Member Variables
|
protected array |
$citations
= array()
Aggregated citations. |
|
protected array |
$directives
= array()
Aggregated directives. |
|
protected array |
$footnotes
= array()
Aggregated footnotes. |
|
public int |
$indentation
= 0
Current indentation document. |
|
protected array |
$links
= array()
Aggregated links |
|
protected bool |
$skipPostDecoration
= false
Flag indicating whether to skip the paragraph post processing decoration with links and foornotes. Should be disabled during visiting sub-elements like footnotes. |
|
public int |
$wordWrap
= 78
Maximum number of characters per line |
Inherited Member Variables
From
ezcDocumentElementVisitorConverter:
From
ezcDocumentConverter:
Method Summary
Inherited Methods
From
ezcDocumentElementVisitorConverter :
From
ezcDocumentConverter :
Methods
__construct
Construct converter
Construct converter from XSLT file, which is used for the actual
Parameters
Redefinition of
appendCitation
int appendCitation(
string
$citation )
Append citation
Append a citation to the document, which then will be visited at the end of the document processing. Returns a numeric identifier for the citation.
Parameters
| Name |
Type |
Description |
$citation |
string |
|
appendDirective
void appendDirective(
string
$directive )
Append directive
Append a directive, which are normally rendered right below the paragraph.
Parameters
| Name |
Type |
Description |
$directive |
string |
|
appendFootnote
int appendFootnote(
string
$footnote )
Append footnote
Append a footnote to the document, which then will be visited at the end of the document processing. Returns a numeric identifier for the footnote.
Parameters
| Name |
Type |
Description |
$footnote |
string |
|
appendLink
void appendLink(
string
$link )
Append link
Append link, which should be rendered below the paragraph.
Parameters
| Name |
Type |
Description |
$link |
string |
|
createDocument
ezcDocumentDocument createDocument(
mixed
$content )
Create document from structure
Build a ezcDocumentDocument object from the structure created during the visiting process.
Parameters
| Name |
Type |
Description |
$content |
mixed |
|
Redefinition of
escapeRstText
string escapeRstText(
string
$string )
Escape RST text
Parameters
| Name |
Type |
Description |
$string |
string |
|
finishDocument
string finishDocument(
string
$root )
Finish document
Append the footnotes and citations to the end of the document. The footnotes are embedded directly in the text in docbook, aggregated during the processing of the document, and displayed at the bottom of the RST document.
Parameters
| Name |
Type |
Description |
$root |
string |
|
finishParagraph
string finishParagraph(
string
$root )
Append all remaining links at the bottom of the last element.
Parameters
| Name |
Type |
Description |
$root |
string |
|
initializeDocument
mixed initializeDocument(
)
Initialize destination document
Initialize the structure which the destination document could be build with. This may be an initial DOMDocument with some default elements, or a string, or something else.
Redefinition of
setSkipPostDecoration
void setSkipPostDecoration(
bool
$flag )
Set skip post processing
Flag indicating whether to skip the paragraph post processing decoration with links and foornotes. Should be disabled during visiting sub-elements like footnotes.
Parameters
| Name |
Type |
Description |
$flag |
bool |
|
visitText
mixed visitText(
$node, mixed
$root )
Visit text node.
Visit a text node in the source document and transform it to the destination result
Parameters
| Name |
Type |
Description |
$node |
DOMText |
|
$root |
mixed |
|
Redefinition of
wordWrap
string wordWrap(
string
$text, [int
$indentation = 0] )
Wrap given text
Wrap the given text to the line width specified in the converter options, with an optional indentation.
Parameters
| Name |
Type |
Description |
$text |
string |
|
$indentation |
int |
|
Last updated: Tue, 23 Mar 2010