diff options
Diffstat (limited to '3rdparty/XML/Parser.php')
-rw-r--r-- | 3rdparty/XML/Parser.php | 36 |
1 files changed, 11 insertions, 25 deletions
diff --git a/3rdparty/XML/Parser.php b/3rdparty/XML/Parser.php index a38a161aef9..04dd348753d 100644 --- a/3rdparty/XML/Parser.php +++ b/3rdparty/XML/Parser.php @@ -192,26 +192,6 @@ class XML_Parser extends PEAR var $_validEncodings = array('ISO-8859-1', 'UTF-8', 'US-ASCII'); // }}} - // {{{ php4 constructor - - /** - * Creates an XML parser. - * - * This is needed for PHP4 compatibility, it will - * call the constructor, when a new instance is created. - * - * @param string $srcenc source charset encoding, use NULL (default) to use - * whatever the document specifies - * @param string $mode how this parser object should work, "event" for - * startelement/endelement-type events, "func" - * to have it call functions named after elements - * @param string $tgtenc a valid target encoding - */ - function XML_Parser($srcenc = null, $mode = 'event', $tgtenc = null) - { - XML_Parser::__construct($srcenc, $mode, $tgtenc); - } - // }}} // {{{ php5 constructor /** @@ -364,7 +344,7 @@ class XML_Parser extends PEAR } $this->parser = $xp; $result = $this->_initHandlers($this->mode); - if ($this->isError($result)) { + if (PEAR::isError($result)) { return $result; } xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, $this->folding); @@ -393,7 +373,7 @@ class XML_Parser extends PEAR function reset() { $result = $this->_create(); - if ($this->isError($result)) { + if (PEAR::isError($result)) { return $result; } return true; @@ -505,7 +485,7 @@ class XML_Parser extends PEAR * reset the parser */ $result = $this->reset(); - if ($this->isError($result)) { + if (PEAR::isError($result)) { return $result; } // if $this->fp was fopened previously @@ -610,10 +590,16 @@ class XML_Parser extends PEAR * * @return XML_Parser_Error reference to the error object **/ - function &raiseError($msg = null, $ecode = 0) + static function &raiseError($message = null, + $code = 0, + $mode = null, + $options = null, + $userinfo = null, + $error_class = null, + $skipmsg = false) { $msg = !is_null($msg) ? $msg : $this->parser; - $err = &new XML_Parser_Error($msg, $ecode); + $err = new XML_Parser_Error($msg, $ecode); return parent::raiseError($err); } |