Path

ez components / documentation / api reference / 2009.2.1 / document


eZ Components 2009.2.1

Document: ezcDocumentConverter

[ Tutorial ] [ Conversion ] [ Styles ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcDocumentConverter

A base class for document type converters. [source]

Implemented Interfaces

Descendents

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.
ezcDocumentDocbookToRstConverter::__construct() Construct converter
ezcDocumentDocbookToEzXmlConverter::__construct() Construct converter
ezcDocumentDocbookToOdtConverter::__construct() Construct converter
ezcDocumentDocbookToWikiConverter::__construct() Construct converter.
ezcDocumentDocbookToHtmlConverter::__construct() Construct converter
ezcDocumentEzXmlToDocbookConverter::__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.

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  

Last updated: Tue, 23 Mar 2010