$this->proxy_user,
$this->proxy_pass,
$this->proxy_authtype,
- // bc
+ // BC
$method == 'http11' ? 'http' : $method,
$this->keepalive,
$this->key,
return $response;
}
- // BC layer
-
+ // *** BC layer ***
/**
+ * @deprecated
+ *
* @param Request $req
* @param string $server
* @param int $port
* @param int $proxyAuthType
* @param string $method
* @return Response
- * @deprecated
- *
*/
protected function sendPayloadHTTP10($req, $server, $port, $timeout = 0, $username = '', $password = '',
$authType = 1, $proxyHost = '', $proxyPort = 0, $proxyUsername = '', $proxyPassword = '', $proxyAuthType = 1,
}
/**
+ * @deprecated
+ *
* @param Request $req
* @param string $server
* @param int $port
* @param string $keyPass
* @param int $sslVersion
* @return Response
- * @deprecated
- *
*/
protected function sendPayloadHTTPS($req, $server, $port, $timeout = 0, $username = '', $password = '',
$authType = 1, $cert = '', $certPass = '', $caCert = '', $caCertDir = '', $proxyHost = '', $proxyPort = 0,
$proxyUsername = '', $proxyPassword = '', $proxyAuthType = 1, $method = 'http', $key = '', $keyPass = '',
$sslVersion = 0)
{
+ $this->logDeprecationUnlessCalledBy('send');
+
return $this->sendViaSocket($req, $method, $server, $port, $this->path, array(
'accepted_charset_encodings' => $this->accepted_charset_encodings,
'accepted_compression' => $this->accepted_compression,
}
/**
+ * @deprecated
+ *
* @param Request $req
* @param string $server
* @param int $port
* @param string $keyPass
* @param int $sslVersion
* @return Response
- * @deprecated
- *
*/
protected function sendPayloadCURL($req, $server, $port, $timeout = 0, $username = '', $password = '',
$authType = 1, $cert = '', $certPass = '', $caCert = '', $caCertDir = '', $proxyHost = '', $proxyPort = 0,
$proxyUsername = '', $proxyPassword = '', $proxyAuthType = 1, $method = 'https', $keepAlive = false, $key = '',
$keyPass = '', $sslVersion = 0)
{
+ $this->logDeprecationUnlessCalledBy('send');
+
return $this->sendViaCURL($req, $method, $server, $port, $this->path, array(
'accepted_charset_encodings' => $this->accepted_charset_encodings,
'accepted_compression' => $this->accepted_compression,
$proxyUsername = '', $proxyPassword = '', $proxyAuthType = 1, $method = 'https', $keepAlive = false, $key = '',
$keyPass = '', $sslVersion = 0)
{
+ $this->logDeprecationUnlessCalledBy('sendViaCURL');
+
return $this->createCurlHandle($req, $method, $server, $port, $this->path, array(
'accepted_charset_encodings' => $this->accepted_charset_encodings,
'accepted_compression' => $this->accepted_compression,
*/
protected function serializeData($typ, $val, $charsetEncoding = '')
{
+ $this->logDeprecationUnlessCalledBy('serialize');
+
$rs = '';
if (!isset(static::$xmlrpcTypes[$typ])) {
return '<value>' . $this->serializeData($typ, $val, $charsetEncoding) . "</value>\n";
}
- /**
- * Checks whether a struct member with a given name is present.
- *
- * Works only on xml-rpc values of type struct.
- *
- * @param string $key the name of the struct member to be looked up
- * @return boolean
- *
- * @deprecated use array access, e.g. isset($val[$key])
- */
- public function structMemExists($key)
- {
- $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
-
- return array_key_exists($key, $this->me['struct']);
- }
-
- /**
- * Returns the value of a given struct member (an xml-rpc value object in itself).
- * Will raise a php warning if struct member of given name does not exist.
- *
- * @param string $key the name of the struct member to be looked up
- * @return Value
- *
- * @deprecated use array access, e.g. $val[$key]
- */
- public function structMem($key)
- {
- $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
-
- return $this->me['struct'][$key];
- }
-
- /**
- * Reset internal pointer for xml-rpc values of type struct.
- * @return void
- *
- * @deprecated iterate directly over the object using foreach instead
- */
- public function structReset()
- {
- $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
-
- reset($this->me['struct']);
- }
-
- /**
- * Return next member element for xml-rpc values of type struct.
- *
- * @return Value
- * @throws \Error starting with php 8.0, this function should not be used, as it will always throw
- *
- * @deprecated iterate directly over the object using foreach instead
- */
- public function structEach()
- {
- $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
-
- return @each($this->me['struct']);
- }
-
/**
* Returns the value of a scalar xml-rpc value (base 64 decoding is automatically handled here)
*
return $a;
}
- /**
- * Returns the m-th member of an xml-rpc value of array type.
- *
- * @param integer $key the index of the value to be retrieved (zero based)
- *
- * @return Value
- *
- * @deprecated use array access, e.g. $val[$key]
- */
- public function arrayMem($key)
- {
- $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
-
- return $this->me['array'][$key];
- }
-
- /**
- * Returns the number of members in an xml-rpc value of array type.
- *
- * @return integer
- *
- * @deprecated use count() instead
- */
- public function arraySize()
- {
- $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
-
- return count($this->me['array']);
- }
-
- /**
- * Returns the number of members in an xml-rpc value of struct type.
- *
- * @return integer
- *
- * @deprecated use count() instead
- */
- public function structSize()
- {
- $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
-
- return count($this->me['struct']);
- }
-
/**
* Returns the number of members in an xml-rpc value:
* - 0 for uninitialized values
throw new StateErrorException("XML-RPC Value is of type 'undef' and can not be accessed using array index");
}
}
+
+ // *** BC layer ***
+
+ /**
+ * Checks whether a struct member with a given name is present.
+ *
+ * Works only on xml-rpc values of type struct.
+ *
+ * @param string $key the name of the struct member to be looked up
+ * @return boolean
+ *
+ * @deprecated use array access, e.g. isset($val[$key])
+ */
+ public function structMemExists($key)
+ {
+ $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
+
+ return array_key_exists($key, $this->me['struct']);
+ }
+
+ /**
+ * Returns the value of a given struct member (an xml-rpc value object in itself).
+ * Will raise a php warning if struct member of given name does not exist.
+ *
+ * @param string $key the name of the struct member to be looked up
+ * @return Value
+ *
+ * @deprecated use array access, e.g. $val[$key]
+ */
+ public function structMem($key)
+ {
+ $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
+
+ return $this->me['struct'][$key];
+ }
+
+ /**
+ * Reset internal pointer for xml-rpc values of type struct.
+ * @return void
+ *
+ * @deprecated iterate directly over the object using foreach instead
+ */
+ public function structReset()
+ {
+ $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
+
+ reset($this->me['struct']);
+ }
+
+ /**
+ * Return next member element for xml-rpc values of type struct.
+ *
+ * @return Value
+ * @throws \Error starting with php 8.0, this function should not be used, as it will always throw
+ *
+ * @deprecated iterate directly over the object using foreach instead
+ */
+ public function structEach()
+ {
+ $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
+
+ return @each($this->me['struct']);
+ }
+
+ /**
+ * Returns the m-th member of an xml-rpc value of array type.
+ *
+ * @param integer $key the index of the value to be retrieved (zero based)
+ *
+ * @return Value
+ *
+ * @deprecated use array access, e.g. $val[$key]
+ */
+ public function arrayMem($key)
+ {
+ $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
+
+ return $this->me['array'][$key];
+ }
+
+ /**
+ * Returns the number of members in an xml-rpc value of array type.
+ *
+ * @return integer
+ *
+ * @deprecated use count() instead
+ */
+ public function arraySize()
+ {
+ $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
+
+ return count($this->me['array']);
+ }
+
+ /**
+ * Returns the number of members in an xml-rpc value of struct type.
+ *
+ * @return integer
+ *
+ * @deprecated use count() instead
+ */
+ public function structSize()
+ {
+ $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
+
+ return count($this->me['struct']);
+ }
}