From 380a2b3ff7b7aa685fa4897f44d0c7ed61363889 Mon Sep 17 00:00:00 2001 From: Samu Voutilainen Date: Fri, 23 May 2014 12:28:03 +0300 Subject: [PATCH 1/1] Renamed Xmlrpc class to Phpxmlrpc --- lib/xmlrpc.php | 24 ++++++++++++------------ lib/xmlrpc_client.php | 8 ++++---- lib/xmlrpcmsg.php | 4 ++-- lib/xmlrpcresp.php | 2 +- lib/xmlrpcval.php | 10 +++++----- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lib/xmlrpc.php b/lib/xmlrpc.php index fb94bf3..66ee6ab 100644 --- a/lib/xmlrpc.php +++ b/lib/xmlrpc.php @@ -39,7 +39,7 @@ require_once __DIR__ . "/xmlrpcresp.php"; require_once __DIR__ . "/xmlrpcmsg.php"; require_once __DIR__ . "/xmlrpcval.php"; -class Xmlrpc { +class Phpxmlrpc { public $xmlrpcI4 = "i4"; public $xmlrpcInt = "int"; @@ -225,11 +225,11 @@ class Xmlrpc { * This class is singleton for performance reasons: this way the ASCII array needs to be done only once. */ public static function instance() { - if(Xmlrpc::$instance === null) { - Xmlrpc::$instance = new Xmlrpc(); + if(Phpxmlrpc::$instance === null) { + Phpxmlrpc::$instance = new Xmlrpc(); } - return Xmlrpc::$instance; + return Phpxmlrpc::$instance; } } @@ -250,7 +250,7 @@ class Xmlrpc { */ function xmlrpc_encode_entitites($data, $src_encoding='', $dest_encoding='') { - $xmlrpc = Xmlrpc::instance(); + $xmlrpc = Phpxmlrpc::instance(); if ($src_encoding == '') { // lame, but we know no better... @@ -383,7 +383,7 @@ for ($nn = 0; $nn < $ns; $nn++) /// xml parser handler function for opening element tags function xmlrpc_se($parser, $name, $attrs, $accept_single_vals=false) { - $xmlrpc = Xmlrpc::instance(); + $xmlrpc = Phpxmlrpc::instance(); // if invalid xmlrpc already detected, skip all processing if ($xmlrpc->_xh['isf'] < 2) { @@ -538,7 +538,7 @@ function xmlrpc_se_any($parser, $name, $attrs) /// xml parser handler function for close element tags function xmlrpc_ee($parser, $name, $rebuild_xmlrpcvals = true) { - $xmlrpc = Xmlrpc::instance(); + $xmlrpc = Phpxmlrpc::instance(); if ($xmlrpc->_xh['isf'] < 2) { @@ -755,7 +755,7 @@ function xmlrpc_ee_fast($parser, $name) /// xml parser handler function for character data function xmlrpc_cd($parser, $data) { - $xmlrpc = Xmlrpc::instance(); + $xmlrpc = Phpxmlrpc::instance(); // skip processing if xml fault already detected if ($xmlrpc->_xh['isf'] < 2) { @@ -784,7 +784,7 @@ function xmlrpc_cd($parser, $data) /// element start/end tag. In fact it only gets called on unknown entities... function xmlrpc_dh($parser, $data) { - $xmlrpc = Xmlrpc::instance(); + $xmlrpc = Phpxmlrpc::instance(); // skip processing if xml fault already detected if ($xmlrpc->_xh['isf'] < 2) { @@ -1007,7 +1007,7 @@ else */ function php_xmlrpc_encode($php_val, $options=array()) { - $xmlrpc = Xmlrpc::instance(); + $xmlrpc = Phpxmlrpc::instance(); $type = gettype($php_val); switch($type) { @@ -1125,7 +1125,7 @@ function php_xmlrpc_encode($php_val, $options=array()) */ function php_xmlrpc_decode_xml($xml_val, $options=array()) { - $xmlrpc = Xmlrpc::instance(); + $xmlrpc = Phpxmlrpc::instance(); $xmlrpc->_xh = array(); $xmlrpc->_xh['ac'] = ''; @@ -1268,7 +1268,7 @@ function decode_chunked($buffer) */ function guess_encoding($httpheader='', $xmlchunk='', $encoding_prefs=null) { - $xmlrpc = Xmlrpc::instance(); + $xmlrpc = Phpxmlrpc::instance(); // discussion: see http://www.yale.edu/pclt/encoding/ // 1 - test if encoding is specified in HTTP HEADERS diff --git a/lib/xmlrpc_client.php b/lib/xmlrpc_client.php index 66226a0..eac05d0 100644 --- a/lib/xmlrpc_client.php +++ b/lib/xmlrpc_client.php @@ -72,7 +72,7 @@ class xmlrpc_client */ function xmlrpc_client($path, $server='', $port='', $method='') { - $xmlrpc = Xmlrpc::instance(); + $xmlrpc = Phpxmlrpc::instance(); // allow user to specify all params in $path if($server == '' and $port == '' and $method == '') @@ -436,7 +436,7 @@ class xmlrpc_client $username='', $password='', $authtype=1, $proxyhost='', $proxyport=0, $proxyusername='', $proxypassword='', $proxyauthtype=1) { - $xmlrpc = Xmlrpc::instance(); + $xmlrpc = Phpxmlrpc::instance(); if($port==0) { @@ -644,7 +644,7 @@ class xmlrpc_client $proxyhost='', $proxyport=0, $proxyusername='', $proxypassword='', $proxyauthtype=1, $method='https', $keepalive=false, $key='', $keypass='') { - $xmlrpc = Xmlrpc::instance(); + $xmlrpc = Phpxmlrpc::instance(); if(!function_exists('curl_init')) { @@ -938,7 +938,7 @@ class xmlrpc_client */ function multicall($msgs, $timeout=0, $method='', $fallback=true) { - $xmlrpc = Xmlrpc::instance(); + $xmlrpc = Phpxmlrpc::instance(); if ($method == '') { diff --git a/lib/xmlrpcmsg.php b/lib/xmlrpcmsg.php index 2bf2aae..7a6d32a 100644 --- a/lib/xmlrpcmsg.php +++ b/lib/xmlrpcmsg.php @@ -170,7 +170,7 @@ class xmlrpcmsg */ function &parseResponseHeaders(&$data, $headers_processed=false) { - $xmlrpc = Xmlrpc::instance(); + $xmlrpc = Phpxmlrpc::instance(); // Support "web-proxy-tunelling" connections for https through proxies if(preg_match('/^HTTP\/1\.[0-1] 200 Connection established/', $data)) { @@ -409,7 +409,7 @@ class xmlrpcmsg */ function &parseResponse($data='', $headers_processed=false, $return_type='xmlrpcvals') { - $xmlrpc = Xmlrpc::instance(); + $xmlrpc = Phpxmlrpc::instance(); if($this->debug) { diff --git a/lib/xmlrpcresp.php b/lib/xmlrpcresp.php index f9d5286..df4c265 100644 --- a/lib/xmlrpcresp.php +++ b/lib/xmlrpcresp.php @@ -114,7 +114,7 @@ class xmlrpcresp */ function serialize($charset_encoding='') { - $xmlrpc = Xmlrpc::instance(); + $xmlrpc = Phpxmlrpc::instance(); if ($charset_encoding != '') $this->content_type = 'text/xml; charset=' . $charset_encoding; diff --git a/lib/xmlrpcval.php b/lib/xmlrpcval.php index df30eb4..dd845ed 100644 --- a/lib/xmlrpcval.php +++ b/lib/xmlrpcval.php @@ -72,7 +72,7 @@ class xmlrpcval */ function addScalar($val, $type='string') { - $xmlrpc = Xmlrpc::instance(); + $xmlrpc = Phpxmlrpc::instance(); $typeof = null; if(isset($xmlrpc->xmlrpcTypes[$type])) { @@ -134,7 +134,7 @@ class xmlrpcval */ function addArray($vals) { - $xmlrpc = Xmlrpc::instance(); + $xmlrpc = Phpxmlrpc::instance(); if($this->mytype==0) { $this->mytype=$xmlrpc->xmlrpcTypes['array']; @@ -164,7 +164,7 @@ class xmlrpcval */ function addStruct($vals) { - $xmlrpc = Xmlrpc::instance(); + $xmlrpc = Phpxmlrpc::instance(); if($this->mytype==0) { @@ -230,7 +230,7 @@ class xmlrpcval */ function serializedata($typ, $val, $charset_encoding='') { - $xmlrpc = Xmlrpc::instance(); + $xmlrpc = Phpxmlrpc::instance(); $rs=''; if(!isset($xmlrpc->xmlrpcTypes[$typ])) { @@ -468,7 +468,7 @@ class xmlrpcval */ function scalartyp() { - $xmlrpc = Xmlrpc::instance(); + $xmlrpc = Phpxmlrpc::instance(); reset($this->me); list($a,)=each($this->me); -- 2.43.0