|
From: <nma...@us...> - 2006-03-10 10:48:32
|
Revision: 13 Author: nmarkgraf Date: 2006-03-10 02:48:24 -0800 (Fri, 10 Mar 2006) ViewCVS: http://svn.sourceforge.net/opendocumentphp/?rev=13&view=rev Log Message: ----------- Forgot this one :D Modified Paths: -------------- poc/src/OpenDocumentFactory.php Modified: poc/src/OpenDocumentFactory.php =================================================================== --- poc/src/OpenDocumentFactory.php 2006-03-10 10:45:55 UTC (rev 12) +++ poc/src/OpenDocumentFactory.php 2006-03-10 10:48:24 UTC (rev 13) @@ -6,28 +6,30 @@ * @author Norman Markgraf <nma...@us...> * @author Alex Latchford <yaw...@us...> * @version $Revision$ - * @package OpenDocument + * @package OpenDocument.Factory * @since 0.4.0 * * $Id$ */ function __autoload($class_name) { - // Classes in subdirectories have '_' instead of '/' or '\\' in their names. - require_once( strtr ( $class_name, "_", "/" ) . ".php" ); + // There is no "void" class, so we must ignore it + if ($class_name != "void" ) { + // Classes in subdirectories have '_' instead of '/' or '\\' in their names. + require_once( strtr ( $class_name, "_", "/" ) . ".php" ); + } } final class OpenDocumentFactory { /** * Creates a OpenDocument. - * + * @since 0.4.0 * @return OpenDocument */ static public function createOpenDocument( $documentName, $documentPath=0, $singleDocument = TRUE, $mimeType="application/vnd.oasis.opendocument.text" ) { if ( $singleDocument ) { return new OpenDocumentSingle( $mimeType ); - return 0; } else { return new OpenDocumentPackage( $documentName, $documentPath, $mimeType ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |