* // Get a RST document from a file * $doc = ezcDocumentManager::loadFile( 'rst', '/path/to/my.rst' ); * * // Overwrite the used implementation with a custom RST handler * ezcDocumentManager::setHandler( 'rst', 'myRsthandler' ); * // This will now use the custom handler * $doc = ezcDocumentManager::loadFile( 'rst', '/path/to/my.rst' ); * * * @package Document * @version 1.0alpha1 * @copyright Copyright (C) 2005-2008 eZ systems as. All rights reserved. * @license http://ez.no/licenses/new_bsd New BSD License * @mainclass */ final class ezcDocumentManager { /** * Predefined handler list. * * @var array */ protected static $handlers = array( 'rst' => 'ezcDocumentRst', // ... ); /** * Load file with specified handler * * @param string $format * @param string $file * @return ezcDocument */ public static function loadFile( $format, $file ) { // @TODO: Implement } /** * Set handler for format * * Set the format handler for $format to the specified handler class, which * should extend from ezcDocument. * * @param string $format * @param string $handler * @return void */ public static function setHandler( $format, $handler ) { // @TODO: Implement } } ?>