Apache Zeta Components - high quality PHP components

Apache Zeta Components Manual :: Docs For Class ezcDocumentConverter

Document::ezcDocumentConverter

Class ezcDocumentConverter

A base class for document type converters.

Source for this file: /Document/src/interfaces/converter.php

Implements interfaces:

Version:   //autogen//

Descendants

Child Class Description
ezcDocumentXsltConverter Base class for conversions between XML documents using XSLT.
ezcDocumentElementVisitorConverter Basic converter which stores a list of handlers for each node in the docbook element tree. Those handlers will be executed for the elements, when found.

Member Variables

protected ezcDocumentXmlOptions $options
XML document base options.
protected array $properties = array(
'errors' => array(),)

Additional parser properties.

Method Summary

public ezcDocumentConverter __construct( [ $options = null] )
Construct new document
public abstract ezcDocument convert( $doc )
Convert documents between two formats
public array getErrors( )
Return list of errors occured during visiting the document.
public void triggerError( $level , $message , [ $file = null] , [ $line = null] , [ $position = null] )
Trigger parser error

Methods

__construct

ezcDocumentConverter __construct( [ezcDocumentConverterOptions $options = null] )

Construct new document

Parameters:
Name Type Description
$options ezcDocumentConverterOptions
Redefined in descendants as:
Method Description
ezcDocumentXsltConverter::__construct() Construct converter 
ezcDocumentDocbookToHtmlXsltConverter::__construct() Construct new document converter. 
ezcDocumentEzXmlToDocbookConverter::__construct() Construct converter 
ezcDocumentDocbookToWikiConverter::__construct() Construct converter. 
ezcDocumentDocbookToRstConverter::__construct() Construct converter 
ezcDocumentDocbookToHtmlConverter::__construct() Construct converter 
ezcDocumentDocbookToEzXmlConverter::__construct() Construct converter 
ezcDocumentDocbookToOdtConverter::__construct() Construct converter 

convert

ezcDocument convert( ezcDocument $doc )

Convert documents between two formats

Convert documents of the given type to the requested type.

Parameters:
Name Type Description
$doc ezcDocument
Redefined in descendants as:
Method Description
ezcDocumentXsltConverter::convert() Convert documents between two formats 
ezcDocumentElementVisitorConverter::convert() Convert documents between two formats 
ezcDocumentDocbookToOdtConverter::convert() Converts the given DocBook $source to an ODT document. 

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 parser error

Emit a parser error and handle it dependiing on the current 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.
Documentation generated by phpDocumentor 1.4.3