docs
authorgggeek <giunta.gaetano@gmail.com>
Sat, 4 Feb 2023 12:49:22 +0000 (12:49 +0000)
committergggeek <giunta.gaetano@gmail.com>
Sat, 4 Feb 2023 12:49:22 +0000 (12:49 +0000)
NEWS.md
doc/api_changes_v4.10.md
src/Client.php
src/Server.php

diff --git a/NEWS.md b/NEWS.md
index e2efc99..de8bc1b 100644 (file)
--- a/NEWS.md
+++ b/NEWS.md
   - traits have been introduced for all classes dealing with Logger, XMLParser and CharsetEncoder; method `setCharsetEncoder`
     is now static
   - new methods in helper classes: `Charset::knownCharsets`, `Http::parseAcceptHeader`, `XMLParser::truncateValueForLog`
+  - new method `Response::xml_header` has replaced `Server::xml_header`
   - exception `\PhpXmlRpc\Exception\PhpXmlRpcException` is deprecated. Use `\PhpXmlRpc\Exception` instead
 
 
index 8264e6c..330b48f 100644 (file)
@@ -6,8 +6,8 @@ to happen in future version 5.
 
 In particular, API cleanups mean that most public access to object properties has been replaced by dedicated methods.
 
-New classes, traits, exceptions
--------------------------------
+New classes, traits, exceptions, interfaces
+-------------------------------------------
 
 For the first time, usage of custom exceptions is in place. Traits are also in use for sharing common functionality.
 
@@ -89,6 +89,8 @@ New static properties
 | PhpXmlRpc | $xmlrpc_reject_invalid_values | false               |           |
 | PhpXmlRpc | $xmlrpc_return_datetimes      | false               |           |
 | PhpXmlRpc | $xmlrpc_silence_deprecations  | true                |           |
+| Server    | $options                      | see code            | protected |
+| Wrapper   | $namespace                    | \PhpXmlRpc\         | protected |
 
 New constants
 -------------
@@ -103,12 +105,35 @@ Changed methods
 
 The following methods acquired new parameters, or accept a wider range of values for existing parameters
 
-| Class     | Method   | Notes |
-|-----------|----------|-------|
-| PhpXmlRpc | $xmlrpc_ |       |
+| Class     | Method           | Notes                                                              |
+|-----------|------------------|--------------------------------------------------------------------|
+| Client    | setDebug         | value -1 can now be used for $level                                |
+| Date      | iso8601Encode    | a DateTimeInterface value is accepted for $timet                   |
+| Server    | add_to_map       | new parameters: parametersType = false, $exceptionHandling = false |
+| Wrapper   | wrapPhpClass     | $extraoptions accepts 'encode_nulls'                               |
+| Wrapper   | wrapPhpFunction  | $extraoptions accepts 'encode_nulls'                               |
+| Wrapper   | wrapXmlrpcMethod | $extraoptions accepts 'throw_on_fault'                             |
+| Wrapper   | wrapXmlrpcMethod | $extraoptions accepts 'encode_nulls'                               |
+| Wrapper   | wrapXmlrpcServer | $extraoptions accepts 'throw_on_fault'                             |
+| Wrapper   | wrapXmlrpcServer | $extraoptions accepts 'encode_null'                                |
+| XMLParser | __construct      | extra values accepted in $options (see code)                       |
+| XMLParser | parse            | extra values accepted in $options (see code)                       |
+
+The following methods have had some parameters deprecated
+
+| Class     | Method    | Notes                                          |
+|-----------|-----------|------------------------------------------------|
+| Client    | send      | parameters $timeout and $method are deprecated |
+| Client    | multicall | parameters $timeout and $method are deprecated |
+
+The following methods have modified their return value
+
+| Class     | Method         | Notes   |
+|-----------|----------------|---------|
+| Client    | _try_multicall | private |
 
 Deprecated methods
----------------------
+------------------
 
 | Class   | Method                | Replacement          |
 |---------|-----------------------|----------------------|
index 076cdce..33c5ecd 100644 (file)
@@ -77,133 +77,107 @@ class Client
 
     /**
      * @var string
-     * @internal use getUrl/__construct
      */
     protected $method = 'http';
     /**
      * @var string
-     * @internal use getUrl/__construct
      */
     protected $server;
     /**
      * @var int
-     * @internal use getUrl/__construct
      */
     protected $port = 0;
     /**
      * @var string
-     * @internal use getUrl/__construct
      */
     protected $path;
 
     /**
      * @var int
-     * @internal use setOption/getOption
      */
     protected $debug = 0;
     /**
      * @var string
-     * @internal use setCredentials/getOption
      */
     protected $username = '';
     /**
      * @var string
-     * @internal use setCredentials/getOption
      */
     protected $password = '';
     /**
      * @var int
-     * @internal use setCredentials/getOption
      */
     protected $authtype = 1;
     /**
      * @var string
-     * @internal use setCertificate/getOption
      */
     protected $cert = '';
     /**
      * @var string
-     * @internal use setCertificate/getOption
      */
     protected $certpass = '';
     /**
      * @var string
-     * @internal use setCaCertificate/getOption
      */
     protected $cacert = '';
     /**
      * @var string
-     * @internal use setCaCertificate/getOption
      */
     protected $cacertdir = '';
     /**
      * @var string
-     * @internal use setKey/getOption
      */
     protected $key = '';
     /**
      * @var string
-     * @internal use setKey/getOption
      */
     protected $keypass = '';
     /**
      * @var bool
-     * @internal use setOption/getOption
      */
     protected $verifypeer = true;
     /**
      * @var int
-     * @internal use setOption/getOption
      */
     protected $verifyhost = 2;
     /**
      * @var int
-     * @internal use setOption/getOption
      */
     protected $sslversion = 0; // corresponds to CURL_SSLVERSION_DEFAULT
     /**
      * @var string
-     * @internal use setProxy/getOption
      */
     protected $proxy = '';
     /**
      * @var int
-     * @internal use setProxy/getOption
      */
     protected $proxyport = 0;
     /**
      * @var string
-     * @internal use setProxy/getOption
      */
     protected $proxy_user = '';
     /**
      * @var string
-     * @internal use setProxy/getOption
      */
     protected $proxy_pass = '';
     /**
      * @var int
-     * @internal use setProxy/getOption
      */
     protected $proxy_authtype = 1;
     /**
      * @var array
-     * @internal use setCookie/getOption
      */
     protected $cookies = array();
     /**
      * @var array
-     * @internal use setOption/getOption
      */
     protected $extracurlopts = array();
     /**
      * @var int
-     * @internal use setOption/getOption
      */
     protected $timeout = 0;
     /**
      * @var int
-     * @internal use setOption/getOption
      */
     protected $use_curl = self::USE_CURL_AUTO;
     /**
@@ -213,8 +187,6 @@ class Client
      * to dispatch to the server an array of requests in a single http roundtrip or simply execute many consecutive http
      * calls. Defaults to FALSE, but it will be enabled automatically on the first failure of execution of
      * system.multicall.
-     *
-     * @internal use setOption/getOption
      */
     protected $no_multicall = false;
     /**
@@ -226,8 +198,6 @@ 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 whether compression is supported or not
-     *
-     * @internal use setAcceptedCompression/getOption
      */
     protected $accepted_compression = array();
     /**
@@ -235,24 +205,18 @@ class Client
      *
      * Name of compression scheme to be used for sending requests.
      * Either null, 'gzip' or 'deflate'.
-     *
-     * @internal use setOption/getOption
      */
     protected $request_compression = '';
     /**
      * @var bool
      *
      * Whether to use persistent connections for http 1.1 and https. Value set at constructor time.
-     *
-     * @internal use setOption/getOption
      */
     protected $keepalive = false;
     /**
      * @var string[]
      *
      * Charset encodings that can be decoded without problems by the client. Value set at constructor time
-     *
-     * @internal use setOption/getOption
      */
     protected $accepted_charset_encodings = array();
     /**
@@ -264,8 +228,6 @@ class Client
      * in the transfer, a CR-LF will be preserved as well as a singe LF).
      * Valid values are 'US-ASCII', 'UTF-8' and 'ISO-8859-1'.
      * For the fastest mode of operation, set your both your app internal encoding and this to UTF-8.
-     *
-     * @internal use setOption/getOption
      */
     protected $request_charset_encoding = '';
     /**
@@ -282,16 +244,12 @@ class Client
      * Note that the 'phpvals' setting will yield faster execution times, but some of the information from the original
      * response will be lost. It will be e.g. impossible to tell whether a particular php string value was sent by the
      * server as an xml-rpc string or base64 value.
-     *
-     * @internal use setOption/getOption
      */
     protected $return_type = XMLParser::RETURN_XMLRPCVALS;
     /**
      * @var string
      *
      * Sent to servers in http headers. Value set at constructor time.
-     *
-     * @internal use setOption/getOption
      */
     protected $user_agent;
 
@@ -417,7 +375,7 @@ class Client
     }
 
     /**
-     * @param string $name
+     * @param string $name see all the OPT_ constants
      * @param mixed $value
      * @return $this
      * @throws ValueErrorException on unsupported option
@@ -433,7 +391,7 @@ class Client
     }
 
     /**
-     * @param string $name
+     * @param string $name see all the OPT_ constants
      * @return mixed
      * @throws ValueErrorException on unsupported option
      */
@@ -447,7 +405,7 @@ class Client
     }
 
     /**
-     * Returns the complete list of Client options.
+     * Returns the complete list of Client options, with their value.
      * @return array
      */
     public function getOptions()
@@ -460,7 +418,7 @@ class Client
     }
 
     /**
-     * @param array $options
+     * @param array $options key: any valid option (see all the OPT_ constants)
      * @return $this
      * @throws ValueErrorException on unsupported option
      */
index a41cc36..f254def 100644 (file)
@@ -194,7 +194,7 @@ class Server
     }
 
     /**
-     * @param string $name
+     * @param string $name see all the OPT_ constants
      * @param mixed $value
      * @return $this
      * @throws ValueErrorException on unsupported option
@@ -220,7 +220,7 @@ class Server
     }
 
     /**
-     * @param string $name
+     * @param string $name see all the OPT_ constants
      * @return mixed
      * @throws ValueErrorException on unsupported option
      */
@@ -242,7 +242,7 @@ class Server
     }
 
     /**
-     * Returns the complete list of Client options.
+     * Returns the complete list of Server options.
      * @return array
      */
     public function getOptions()
@@ -255,7 +255,7 @@ class Server
     }
 
     /**
-     * @param array $options
+     * @param array $options key:  see all the OPT_ constants
      * @return $this
      * @throws ValueErrorException on unsupported option
      */