| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <?php
- namespace ModulesGarden\Servers\ZimbraEmail\App\Libs\Zimbra\Components\Api\Soap;
- use SoapClient;
- /**
- *
- * Created by PhpStorm.
- * User: Tomasz Bielecki ( tomasz.bi@modulesgarden.com )
- * Date: 27.08.19
- * Time: 15:47
- * Class MySoapClient
- */
- class MySoapClient extends SoapClient
- {
- /**
- * @param string $request
- * @param string $location
- * @param string $action
- * @param int $version
- * @return string
- */
- public function __doRequest($request, $location, $action, $version)
- {
- if(stripos($request, 'DistributionListActionRequest') !== false)
- {
- $request = str_replace(array('ns1:DistributionListActionRequest', 'xmlns:ns2="urn:zimbra"'), array('ns2:DistributionListActionRequest', 'xmlns:ns2="urn:zimbraAccount"'), $request);
- }
- logModuleCall(
- 'zimbraEmail',
- __FUNCTION__,
- [
- $request,
- $location,
- $action,
- $version
- ],
- "Debug: request, location, action, version",
- time()
- );
- $response = parent::__doRequest($request, $location, $action, $version);
- logModuleCall(
- 'zimbraEmail',
- __FUNCTION__,
- $response,
- "Debug: response",
- time()
- );
- return $response;
- }
- /**
- * @param string $function_name
- * @param array $arguments
- * @param array|null $options
- * @param null $input_headers
- * @param array|null $output_headers
- * @return mixed|void
- */
- public function __soapCall($function_name, array $arguments, array $options = null, $input_headers = null, array &$output_headers = null)
- {
- logModuleCall(
- 'zimbraEmail',
- __FUNCTION__,
- [
- $function_name,
- $arguments,
- $options,
- $input_headers,
- $output_headers
- ],
- "Debug: function_name, arguments, options, input_headers, output_headers",
- time()
- );
- $response = parent::__soapCall($function_name, $arguments, $options, $input_headers, $output_headers);
- logModuleCall(
- 'zimbraEmail',
- __FUNCTION__,
- $response,
- "Debug: function_name, arguments, options, input_headers, output_headers",
- time()
- );
- return $response;
- }
- }
|