Path

ez components / documentation / api reference / 2008.1 / document


Document: ezcDocumentManager

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

Class: ezcDocumentManager

A ducument type handler manager class. [source]
The document manager manages a list of document handlers for document types, identified by a string. You may overwrite the used implementation for one or all formats, or add custom implementations for new document types.
1.   // Get a RST document from a file
2.     $doc ezcDocumentManager::loadFile'rst''/path/to/my.rst' );
3.  
4.   // Overwrite the used implementation with a custom RST handler
5.     ezcDocumentManager::setHandler'rst''myRsthandler' );
6.   // This will now use the custom handler
7.     $doc ezcDocumentManager::loadFile'rst''/path/to/my.rst' );

Member Variables

protected array $handlers = array(
'rst' => 'ezcDocumentRst',
// ...
)

Predefined handler list.

Method Summary

public static ezcDocument loadFile( $format, $file )
Load file with specified handler
public static void setHandler( $format, $handler )
Set handler for format

Methods

loadFile

ezcDocument loadFile( string $format, string $file )
Load file with specified handler

Parameters

Name Type Description
$format string  
$file string  

setHandler

void setHandler( string $format, string $handler )
Set handler for format
Set the format handler for $format to the specified handler class, which should extend from ezcDocument.

Parameters

Name Type Description
$format string  
$handler string  

Last updated: Wed, 18 Jun 2008