From: Gunnar Wrobel Date: Fri, 10 Dec 2010 07:46:43 +0000 (+0100) Subject: Remove obsolete factory function. Add DOMDocument parameters. phpdoc. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=71766d57a21966b4588252baea3594c1b2e6fb3e;p=horde.git Remove obsolete factory function. Add DOMDocument parameters. phpdoc. --- diff --git a/framework/Kolab_Format/lib/Horde/Kolab/Format/Xml.php b/framework/Kolab_Format/lib/Horde/Kolab/Format/Xml.php index fd147ba10..d2be4c01a 100644 --- a/framework/Kolab_Format/lib/Horde/Kolab/Format/Xml.php +++ b/framework/Kolab_Format/lib/Horde/Kolab/Format/Xml.php @@ -9,7 +9,7 @@ * @author Thomas Jarosch * @author Gunnar Wrobel * @license http://www.fsf.org/copyleft/lgpl.html LGPL - * @link http://pear.horde.org/index.php?package=Kolab_Server + * @link http://pear.horde.org/index.php?package=Kolab_Format */ /** @@ -29,7 +29,7 @@ * @author Thomas Jarosch * @author Gunnar Wrobel * @license http://www.fsf.org/copyleft/lgpl.html LGPL - * @link http://pear.horde.org/index.php?package=Kolab_Server + * @link http://pear.horde.org/index.php?package=Kolab_Format */ class Horde_Kolab_Format_Xml implements Horde_Kolab_Format { @@ -352,34 +352,6 @@ class Horde_Kolab_Format_Xml implements Horde_Kolab_Format } /** - * Attempts to return a concrete Horde_Kolab_Format_Xml instance. - * based on $object_type. - * - * @param string $object_type The object type that should be handled. - * @param array $params Any additional parameters. - * - * @return Horde_Kolab_Format_Xml The newly created concrete - * Horde_Kolab_Format_Xml instance. - * - * @throws Horde_Kolab_Format_Exception If the class for the object type could - * not be loaded. - */ - static public function factory($object_type = '', $params = null) - { - $object_type = ucfirst(str_replace('-', '', $object_type)); - $class = 'Horde_Kolab_Format_Xml_' . $object_type; - - if (class_exists($class)) { - $driver = new $class($params); - } else { - throw new Horde_Kolab_Format_Exception(sprintf('Failed to load Kolab XML driver %s', - $object_type)); - } - - return $driver; - } - - /** * Return the name of the resulting document. * * @return string The name that may be used as filename. @@ -588,7 +560,7 @@ class Horde_Kolab_Format_Xml implements Horde_Kolab_Format */ public function _parseXml(&$xmltext) { - $this->_xmldoc = new DOMDocument(); + $this->_xmldoc = new DOMDocument('1.0', 'UTF-8'); $this->_xmldoc->preserveWhiteSpace = false; $this->_xmldoc->formatOutput = true;