diff options
Diffstat (limited to 'libs/Zend/Log/Formatter/Xml.php')
-rw-r--r-- | libs/Zend/Log/Formatter/Xml.php | 47 |
1 files changed, 8 insertions, 39 deletions
diff --git a/libs/Zend/Log/Formatter/Xml.php b/libs/Zend/Log/Formatter/Xml.php index ebf3c29e97..ce0edb1301 100644 --- a/libs/Zend/Log/Formatter/Xml.php +++ b/libs/Zend/Log/Formatter/Xml.php @@ -15,21 +15,21 @@ * @category Zend * @package Zend_Log * @subpackage Formatter - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Xml.php 20104 2010-01-06 21:26:01Z matthew $ + * @version $Id: Xml.php 16219 2009-06-21 19:45:39Z thomas $ */ /** Zend_Log_Formatter_Interface */ -// require_once 'Zend/Log/Formatter/Interface.php'; +require_once 'Zend/Log/Formatter/Interface.php'; /** * @category Zend * @package Zend_Log * @subpackage Formatter - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Xml.php 20104 2010-01-06 21:26:01Z matthew $ + * @version $Id: Xml.php 16219 2009-06-21 19:45:39Z thomas $ */ class Zend_Log_Formatter_Xml implements Zend_Log_Formatter_Interface { @@ -44,44 +44,14 @@ class Zend_Log_Formatter_Xml implements Zend_Log_Formatter_Interface protected $_elementMap; /** - * @var string Encoding to use in XML - */ - protected $_encoding; - - /** * Class constructor * - * @param string $rootElement Name of root element * @param array $elementMap - * @param string $encoding Encoding to use (defaults to UTF-8) */ - public function __construct($rootElement = 'logEntry', $elementMap = null, $encoding = 'UTF-8') + public function __construct($rootElement = 'logEntry', $elementMap = null) { $this->_rootElement = $rootElement; $this->_elementMap = $elementMap; - $this->setEncoding($encoding); - } - - /** - * Get encoding - * - * @return string - */ - public function getEncoding() - { - return $this->_encoding; - } - - /** - * Set encoding - * - * @param string $value - * @return Zend_Log_Formatter_Xml - */ - public function setEncoding($value) - { - $this->_encoding = (string) $value; - return $this; } /** @@ -101,13 +71,12 @@ class Zend_Log_Formatter_Xml implements Zend_Log_Formatter_Interface } } - $enc = $this->getEncoding(); - $dom = new DOMDocument('1.0', $enc); + $dom = new DOMDocument(); $elt = $dom->appendChild(new DOMElement($this->_rootElement)); foreach ($dataToInsert as $key => $value) { if($key == "message") { - $value = htmlspecialchars($value, ENT_COMPAT, $enc); + $value = htmlspecialchars($value); } $elt->appendChild(new DOMElement($key, $value)); } |