From e7d0817bd555711c6522d954d19b1c7e4db689ca Mon Sep 17 00:00:00 2001 From: gggeek <giunta.gaetano@gmail.com> Date: Mon, 2 Jan 2023 16:25:51 +0000 Subject: [PATCH] improve the proxy demo --- demo/client/proxy.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/demo/client/proxy.php b/demo/client/proxy.php index 12b0a158..800ee86f 100644 --- a/demo/client/proxy.php +++ b/demo/client/proxy.php @@ -14,11 +14,13 @@ class PhpXmlRpcProxy { protected $client; protected $prefix; + protected $encodingOptions = array(); - public function __construct(PhpXmlRpc\Client $client, $prefix = 'examples.') + public function __construct(PhpXmlRpc\Client $client, $prefix = 'examples.', $encodingOptions = array()) { $this->client = $client; $this->prefix = $prefix; + $this->encodingOptions = $encodingOptions; } /** @@ -38,7 +40,7 @@ class PhpXmlRpcProxy $encoder = new PhpXmlRpc\Encoder(); $valueArray = array(); foreach ($arguments as $parameter) { - $valueArray[] = $encoder->encode($parameter); + $valueArray[] = $encoder->encode($parameter, $this->encodingOptions); } // just in case this was set to something else -- 2.47.0