X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2FClient.php;h=074c1966cb9a7cdc1030dbede89e1a9b478774e7;hb=7fbd194478e080d624bab075d189bf3ba215325d;hp=4279ebc7db6a9bccb63afa28f1ea22fbbd8c9133;hpb=747521db86b880520241cc30bee07d978ec66047;p=plcapi.git diff --git a/src/Client.php b/src/Client.php index 4279ebc..074c196 100644 --- a/src/Client.php +++ b/src/Client.php @@ -64,7 +64,7 @@ class Client * NNB: you can set it to any non-empty array for HTTP11 and HTTPS, since * in those cases it will be up to CURL to decide the compression methods * it supports. You might check for the presence of 'zlib' in the output of - * curl_version() to determine wheter compression is supported or not + * curl_version() to determine whether compression is supported or not */ public $accepted_compression = array(); @@ -537,7 +537,6 @@ class Client $this->proxy_pass, $this->proxy_authtype, $method, - $this->keepalive, $this->key, $this->keypass, $this->sslversion @@ -568,8 +567,10 @@ class Client $authType = 1, $proxyHost = '', $proxyPort = 0, $proxyUsername = '', $proxyPassword = '', $proxyAuthType = 1, $method='http') { + //trigger_error('Method ' . __METHOD__ . ' is deprecated', E_USER_DEPRECATED); + return $this->sendPayloadSocket($req, $server, $port, $timeout, $username, $password, $authType, null, null, - null, null, $proxyHost, $proxyPort, $proxyUsername, $proxyPassword, $proxyAuthType); + null, null, $proxyHost, $proxyPort, $proxyUsername, $proxyPassword, $proxyAuthType, $method); } /** @@ -601,6 +602,8 @@ class Client $proxyUsername = '', $proxyPassword = '', $proxyAuthType = 1, $keepAlive = false, $key = '', $keyPass = '', $sslVersion = 0) { + //trigger_error('Method ' . __METHOD__ . ' is deprecated', E_USER_DEPRECATED); + return $this->sendPayloadCURL($req, $server, $port, $timeout, $username, $password, $authType, $cert, $certPass, $caCert, $caCertDir, $proxyHost, $proxyPort, $proxyUsername, $proxyPassword, $proxyAuthType, 'https', $keepAlive, $key, $keyPass, $sslVersion); @@ -645,6 +648,7 @@ class Client $payload = $req->payload; // Deflate request body and set appropriate request headers + $encodingHdr = ''; if (function_exists('gzdeflate') && ($this->request_compression == 'gzip' || $this->request_compression == 'deflate')) { if ($this->request_compression == 'gzip') { $a = @gzencode($payload); @@ -659,8 +663,6 @@ class Client $encodingHdr = "Content-Encoding: deflate\r\n"; } } - } else { - $encodingHdr = ''; } // thanks to Grant Rauscher for this @@ -1260,10 +1262,12 @@ class Client break; case 'struct': $code = $val['faultCode']; + /** @var Value $code */ if ($code->kindOf() != 'scalar' || $code->scalartyp() != 'int') { return false; } $str = $val['faultString']; + /** @var Value $str */ if ($str->kindOf() != 'scalar' || $str->scalartyp() != 'string') { return false; }