Path

ez components / documentation / api reference / 2009.1 / document


eZ Components 2009.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
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.
ezcDocumentXsltConverter Base class for conversions between XML documents using XSLT.

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
ezcDocumentDocbookToWikiConverter::__construct() Construct converter
ezcDocumentDocbookToRstConverter::__construct() Construct converter
ezcDocumentDocbookToEzXmlConverter::__construct() Construct converter
ezcDocumentEzXmlToDocbookConverter::__construct() Construct converter
ezcDocumentDocbookToHtmlConverter::__construct() Construct converter
ezcDocumentXsltConverter::__construct() Construct converter
ezcDocumentDocbookToHtmlXsltConverter::__construct() Construct new document

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
ezcDocumentElementVisitorConverter::convert() Convert documents between two formats
ezcDocumentXsltConverter::convert() Convert documents between two formats

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: Mon, 29 Jun 2009