Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions | Protected Attributes
Zend_Soap_Client Class Reference

Public Member Functions

 __construct ($wsdl=null, $options=null)
 
 setWsdl ($wsdl)
 
 getWsdl ()
 
 setOptions ($options)
 
 getOptions ()
 
 setSoapVersion ($version)
 
 getSoapVersion ()
 
 setClassmap (array $classmap)
 
 getClassmap ()
 
 setEncoding ($encoding)
 
 getEncoding ()
 
 validateUrn ($urn)
 
 setUri ($uri)
 
 getUri ()
 
 setLocation ($location)
 
 getLocation ()
 
 setStyle ($style)
 
 getStyle ()
 
 setEncodingMethod ($use)
 
 getEncodingMethod ()
 
 setHttpLogin ($login)
 
 getHttpLogin ()
 
 setHttpPassword ($password)
 
 getHttpPassword ()
 
 setProxyHost ($proxyHost)
 
 getProxyHost ()
 
 setProxyPort ($proxyPort)
 
 getProxyPort ()
 
 setProxyLogin ($proxyLogin)
 
 getProxyLogin ()
 
 setProxyPassword ($proxyPassword)
 
 setHttpsCertificate ($localCert)
 
 getHttpsCertificate ()
 
 setHttpsCertPassphrase ($passphrase)
 
 getHttpsCertPassphrase ()
 
 setCompressionOptions ($compressionOptions)
 
 getCompressionOptions ()
 
 getProxyPassword ()
 
 setStreamContext ($context)
 
 getStreamContext ()
 
 setSoapFeatures ($feature)
 
 getSoapFeatures ()
 
 setWsdlCache ($caching)
 
 getWsdlCache ()
 
 setUserAgent ($userAgent)
 
 getUserAgent ()
 
 setExceptions ($exceptions)
 
 getExceptions ()
 
 getLastRequest ()
 
 getLastResponse ()
 
 getLastRequestHeaders ()
 
 getLastResponseHeaders ()
 
 getLastMethod ()
 
 _doRequest (Zend_Soap_Client_Common $client, $request, $location, $action, $version, $one_way=null)
 
 addSoapInputHeader (SoapHeader $header, $permanent=false)
 
 resetSoapInputHeaders ()
 
 getLastSoapOutputHeaderObjects ()
 
 __call ($name, $arguments)
 
 getFunctions ()
 
 getTypes ()
 
 setSoapClient (SoapClient $soapClient)
 
 getSoapClient ()
 
 setCookie ($cookieName, $cookieValue=null)
 

Protected Member Functions

 _initSoapClientObject ()
 
 _preProcessArguments ($arguments)
 
 _preProcessResult ($result)
 

Protected Attributes

 $_encoding = 'UTF-8'
 
 $_classmap = null
 
 $_faultExceptions = array()
 
 $_soapVersion = SOAP_1_2
 
 $_uri = null
 
 $_location = null
 
 $_style = null
 
 $_use = null
 
 $_login = null
 
 $_password = null
 
 $_proxy_host = null
 
 $_proxy_port = null
 
 $_proxy_login = null
 
 $_proxy_password = null
 
 $_local_cert = null
 
 $_passphrase = null
 
 $_compression = null
 
 $_connection_timeout = null
 
 $_stream_context = null
 
 $_features = null
 
 $_cache_wsdl = null
 
 $_user_agent = null
 
 $_exceptions = null
 
 $_wsdl = null
 
 $_soapClient
 
 $_lastMethod = ''
 
 $_soapInputHeaders = array()
 
 $_permanentSoapInputHeaders = array()
 
 $_soapOutputHeaders = array()
 

Detailed Description

Definition at line 47 of file Client.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $wsdl = null,
  $options = null 
)

Constructor

Parameters
string$wsdl
array$options

Definition at line 149 of file Client.php.

150  {
151  if (!extension_loaded('soap')) {
152  #require_once 'Zend/Soap/Client/Exception.php';
153  throw new Zend_Soap_Client_Exception('SOAP extension is not loaded.');
154  }
155 
156  if ($wsdl !== null) {
157  $this->setWsdl($wsdl);
158  }
159  if ($options !== null) {
160  $this->setOptions($options);
161  }
162  }
setWsdl($wsdl)
Definition: Client.php:170
setOptions($options)
Definition: Client.php:197

Member Function Documentation

◆ __call()

__call (   $name,
  $arguments 
)

Perform a SOAP call

Parameters
string$name
array$arguments
Returns
mixed

Definition at line 1148 of file Client.php.

1149  {
1150  $soapClient = $this->getSoapClient();
1151 
1152  $this->_lastMethod = $name;
1153 
1154  $soapHeaders = array_merge($this->_permanentSoapInputHeaders, $this->_soapInputHeaders);
1155  $result = $soapClient->__soapCall($name,
1157  null, /* Options are already set to the SOAP client object */
1158  (count($soapHeaders) > 0)? $soapHeaders : null,
1159  $this->_soapOutputHeaders);
1160 
1161  // Reset non-permanent input headers
1162  $this->_soapInputHeaders = array();
1163 
1164  return $this->_preProcessResult($result);
1165  }
$arguments
_preProcessResult($result)
Definition: Client.php:1094
_preProcessArguments($arguments)
Definition: Client.php:1081
if(!isset($_GET['name'])) $name
Definition: log.php:14

◆ _doRequest()

_doRequest ( Zend_Soap_Client_Common  $client,
  $request,
  $location,
  $action,
  $version,
  $one_way = null 
)

Do request proxy method.

May be overridden in subclasses

Definition at line 1029 of file Client.php.

1030  {
1031  // Perform request as is
1032  if ($one_way == null) {
1033  return call_user_func(array($client,'SoapClient::__doRequest'), $request, $location, $action, $version);
1034  } else {
1035  return call_user_func(array($client,'SoapClient::__doRequest'), $request, $location, $action, $version, $one_way);
1036  }
1037  }

◆ _initSoapClientObject()

_initSoapClientObject ( )
protected

Initialize SOAP Client object

Exceptions
Zend_Soap_Client_Exception

Definition at line 1044 of file Client.php.

1045  {
1046  $wsdl = $this->getWsdl();
1047  $options = array_merge($this->getOptions(), array('trace' => true));
1048 
1049  if ($wsdl == null) {
1050  if (!isset($options['location'])) {
1051  #require_once 'Zend/Soap/Client/Exception.php';
1052  throw new Zend_Soap_Client_Exception('\'location\' parameter is required in non-WSDL mode.');
1053  }
1054  if (!isset($options['uri'])) {
1055  #require_once 'Zend/Soap/Client/Exception.php';
1056  throw new Zend_Soap_Client_Exception('\'uri\' parameter is required in non-WSDL mode.');
1057  }
1058  } else {
1059  if (isset($options['use'])) {
1060  #require_once 'Zend/Soap/Client/Exception.php';
1061  throw new Zend_Soap_Client_Exception('\'use\' parameter only works in non-WSDL mode.');
1062  }
1063  if (isset($options['style'])) {
1064  #require_once 'Zend/Soap/Client/Exception.php';
1065  throw new Zend_Soap_Client_Exception('\'style\' parameter only works in non-WSDL mode.');
1066  }
1067  }
1068  unset($options['wsdl']);
1069 
1070  $this->_soapClient = new Zend_Soap_Client_Common(array($this, '_doRequest'), $wsdl, $options);
1071  }

◆ _preProcessArguments()

_preProcessArguments (   $arguments)
protected

Perform arguments pre-processing

My be overridden in descendant classes

Parameters
array$arguments

Definition at line 1081 of file Client.php.

1082  {
1083  // Do nothing
1084  return $arguments;
1085  }
$arguments

◆ _preProcessResult()

_preProcessResult (   $result)
protected

Perform result pre-processing

My be overridden in descendant classes

Parameters
array$arguments

Definition at line 1094 of file Client.php.

1095  {
1096  // Do nothing
1097  return $result;
1098  }

◆ addSoapInputHeader()

addSoapInputHeader ( SoapHeader  $header,
  $permanent = false 
)

Add SOAP input header

Parameters
SoapHeader$header
boolean$permanent
Returns
Zend_Soap_Client

Definition at line 1107 of file Client.php.

1108  {
1109  if ($permanent) {
1110  $this->_permanentSoapInputHeaders[] = $header;
1111  } else {
1112  $this->_soapInputHeaders[] = $header;
1113  }
1114 
1115  return $this;
1116  }

◆ getClassmap()

getClassmap ( )

Retrieve classmap

Returns
mixed

Definition at line 401 of file Client.php.

402  {
403  return $this->_classmap;
404  }

◆ getCompressionOptions()

getCompressionOptions ( )

Get Compression options

Returns
int

Definition at line 794 of file Client.php.

795  {
796  return $this->_compression;
797  }

◆ getEncoding()

getEncoding ( )

Get encoding

Returns
string

Definition at line 432 of file Client.php.

433  {
434  return $this->_encoding;
435  }

◆ getEncodingMethod()

getEncodingMethod ( )

Get message encoding method

Returns
int

Definition at line 571 of file Client.php.

572  {
573  return $this->_use;
574  }

◆ getExceptions()

getExceptions ( )

Get the exceptions option

The exceptions option is a boolean value defining whether soap errors throw exceptions.

See also
http://php.net/manual/soapclient.soapclient.php#refsect1-soapclient.soapclient-parameters
Returns
bool|null

Definition at line 944 of file Client.php.

945  {
946  return $this->_exceptions;
947  }

◆ getFunctions()

getFunctions ( )

Return a list of available functions

Returns
array
Exceptions
Zend_Soap_Client_Exception

Definition at line 1174 of file Client.php.

1175  {
1176  if ($this->getWsdl() == null) {
1177  #require_once 'Zend/Soap/Client/Exception.php';
1178  throw new Zend_Soap_Client_Exception('\'getFunctions\' method is available only in WSDL mode.');
1179  }
1180 
1181  $soapClient = $this->getSoapClient();
1182  return $soapClient->__getFunctions();
1183  }

◆ getHttpLogin()

getHttpLogin ( )

Retrieve HTTP Login

Returns
string

Definition at line 596 of file Client.php.

597  {
598  return $this->_login;
599  }

◆ getHttpPassword()

getHttpPassword ( )

Retrieve HTTP Password

Returns
string

Definition at line 621 of file Client.php.

622  {
623  return $this->_password;
624  }

◆ getHttpsCertificate()

getHttpsCertificate ( )

Get HTTPS client certificate path

Returns
string

Definition at line 742 of file Client.php.

743  {
744  return $this->_local_cert;
745  }

◆ getHttpsCertPassphrase()

getHttpsCertPassphrase ( )

Get HTTPS client certificate passphrase

Returns
string

Definition at line 767 of file Client.php.

768  {
769  return $this->_passphrase;
770  }

◆ getLastMethod()

getLastMethod ( )

Retrieve last invoked method

Returns
string

Definition at line 1010 of file Client.php.

1011  {
1012  return $this->_lastMethod;
1013  }

◆ getLastRequest()

getLastRequest ( )

Retrieve request XML

Returns
string

Definition at line 954 of file Client.php.

955  {
956  if ($this->_soapClient !== null) {
957  return $this->_soapClient->__getLastRequest();
958  }
959 
960  return '';
961  }

◆ getLastRequestHeaders()

getLastRequestHeaders ( )

Retrieve request headers

Returns
string

Definition at line 982 of file Client.php.

983  {
984  if ($this->_soapClient !== null) {
985  return $this->_soapClient->__getLastRequestHeaders();
986  }
987 
988  return '';
989  }

◆ getLastResponse()

getLastResponse ( )

Get response XML

Returns
string

Definition at line 968 of file Client.php.

969  {
970  if ($this->_soapClient !== null) {
971  return $this->_soapClient->__getLastResponse();
972  }
973 
974  return '';
975  }

◆ getLastResponseHeaders()

getLastResponseHeaders ( )

Retrieve response headers (as string)

Returns
string

Definition at line 996 of file Client.php.

997  {
998  if ($this->_soapClient !== null) {
999  return $this->_soapClient->__getLastResponseHeaders();
1000  }
1001 
1002  return '';
1003  }

◆ getLastSoapOutputHeaderObjects()

getLastSoapOutputHeaderObjects ( )

Get last SOAP output headers

Returns
array

Definition at line 1136 of file Client.php.

1137  {
1139  }

◆ getLocation()

getLocation ( )

Retrieve URI

Returns
string

Definition at line 509 of file Client.php.

510  {
511  return $this->_location;
512  }

◆ getOptions()

getOptions ( )

Return array of options suitable for using with SoapClient constructor

Returns
array

Definition at line 296 of file Client.php.

297  {
298  $options = array();
299 
300  $options['classmap'] = $this->getClassmap();
301  $options['encoding'] = $this->getEncoding();
302  $options['soap_version'] = $this->getSoapVersion();
303  $options['wsdl'] = $this->getWsdl();
304  $options['uri'] = $this->getUri();
305  $options['location'] = $this->getLocation();
306  $options['style'] = $this->getStyle();
307  $options['use'] = $this->getEncodingMethod();
308  $options['login'] = $this->getHttpLogin();
309  $options['password'] = $this->getHttpPassword();
310  $options['proxy_host'] = $this->getProxyHost();
311  $options['proxy_port'] = $this->getProxyPort();
312  $options['proxy_login'] = $this->getProxyLogin();
313  $options['proxy_password'] = $this->getProxyPassword();
314  $options['local_cert'] = $this->getHttpsCertificate();
315  $options['passphrase'] = $this->getHttpsCertPassphrase();
316  $options['compression'] = $this->getCompressionOptions();
317  //$options['connection_timeout'] = $this->_connection_timeout;
318  $options['stream_context'] = $this->getStreamContext();
319  $options['cache_wsdl'] = $this->getWsdlCache();
320  $options['features'] = $this->getSoapFeatures();
321  $options['user_agent'] = $this->getUserAgent();
322  $options['exceptions'] = $this->getExceptions();
323 
324  foreach ($options as $key => $value) {
325  /*
326  * ugly hack as I don't know if checking for '=== null'
327  * breaks some other option
328  */
329  if (in_array($key, array('user_agent', 'cache_wsdl', 'compression', 'exceptions'))) {
330  if ($value === null) {
331  unset($options[$key]);
332  }
333  } else {
334  if ($value == null) {
335  unset($options[$key]);
336  }
337  }
338  }
339 
340  return $options;
341  }
getHttpsCertPassphrase()
Definition: Client.php:767
$value
Definition: gender.phtml:16
getCompressionOptions()
Definition: Client.php:794

◆ getProxyHost()

getProxyHost ( )

Retrieve proxy host

Returns
string

Definition at line 646 of file Client.php.

647  {
648  return $this->_proxy_host;
649  }

◆ getProxyLogin()

getProxyLogin ( )

Retrieve proxy login

Returns
string

Definition at line 696 of file Client.php.

697  {
698  return $this->_proxy_login;
699  }

◆ getProxyPassword()

getProxyPassword ( )

Retrieve proxy password

Returns
string

Definition at line 804 of file Client.php.

805  {
806  return $this->_proxy_password;
807  }

◆ getProxyPort()

getProxyPort ( )

Retrieve proxy port

Returns
int

Definition at line 671 of file Client.php.

672  {
673  return $this->_proxy_port;
674  }

◆ getSoapClient()

getSoapClient ( )
Returns
SoapClient

Definition at line 1223 of file Client.php.

1224  {
1225  if ($this->_soapClient == null) {
1226  $this->_initSoapClientObject();
1227  }
1228  return $this->_soapClient;
1229  }

◆ getSoapFeatures()

getSoapFeatures ( )

Return current SOAP Features options

Returns
int

Definition at line 859 of file Client.php.

860  {
861  return $this->_features;
862  }

◆ getSoapVersion()

getSoapVersion ( )

Get SOAP version

Returns
int

Definition at line 368 of file Client.php.

369  {
370  return $this->_soapVersion;
371  }

◆ getStreamContext()

getStreamContext ( )

Get Stream Context

Returns
resource

Definition at line 835 of file Client.php.

836  {
837  return $this->_stream_context;
838  }

◆ getStyle()

getStyle ( )

Get request style

Returns
int

Definition at line 540 of file Client.php.

541  {
542  return $this->_style;
543  }

◆ getTypes()

getTypes ( )

Get used types.

Returns
arrayReturn a list of SOAP types
array
Exceptions
Zend_Soap_Client_Exception

Definition at line 1198 of file Client.php.

1199  {
1200  if ($this->getWsdl() == null) {
1201  #require_once 'Zend/Soap/Client/Exception.php';
1202  throw new Zend_Soap_Client_Exception('\'getTypes\' method is available only in WSDL mode.');
1203  }
1204 
1205  $soapClient = $this->getSoapClient();
1206 
1207  return $soapClient->__getTypes();
1208  }

◆ getUri()

getUri ( )

Retrieve URI

Returns
string

Definition at line 480 of file Client.php.

481  {
482  return $this->_uri;
483  }

◆ getUserAgent()

getUserAgent ( )

Get current string to use in User-Agent header

Returns
string|null

Definition at line 911 of file Client.php.

912  {
913  return $this->_user_agent;
914  }

◆ getWsdl()

getWsdl ( )

Get wsdl

Returns
string

Definition at line 183 of file Client.php.

184  {
185  return $this->_wsdl;
186  }

◆ getWsdlCache()

getWsdlCache ( )

Get current SOAP Wsdl Caching option

Returns
int

Definition at line 885 of file Client.php.

886  {
887  return $this->_cache_wsdl;
888  }

◆ resetSoapInputHeaders()

resetSoapInputHeaders ( )

Reset SOAP input headers

Returns
Zend_Soap_Client

Definition at line 1123 of file Client.php.

1124  {
1125  $this->_permanentSoapInputHeaders = array();
1126  $this->_soapInputHeaders = array();
1127 
1128  return $this;
1129  }

◆ setClassmap()

setClassmap ( array  $classmap)

Set classmap

Parameters
array$classmap
Returns
Zend_Soap_Client
Exceptions
Zend_Soap_Client_Exceptionfor any invalid class in the class map

Definition at line 380 of file Client.php.

381  {
382  foreach ($classmap as $type => $class) {
383  if (!class_exists($class)) {
384  #require_once 'Zend/Soap/Client/Exception.php';
385  throw new Zend_Soap_Client_Exception('Invalid class in class map');
386  }
387  }
388 
389  $this->_classmap = $classmap;
390 
391  $this->_soapClient = null;
392 
393  return $this;
394  }
$type
Definition: item.phtml:13
$_option $_optionId $class
Definition: date.phtml:13

◆ setCompressionOptions()

setCompressionOptions (   $compressionOptions)

Set compression options

Parameters
int | null$compressionOptions
Returns
Zend_Soap_Client

Definition at line 778 of file Client.php.

779  {
780  if ($compressionOptions === null) {
781  $this->_compression = null;
782  } else {
783  $this->_compression = (int)$compressionOptions;
784  }
785  $this->_soapClient = null;
786  return $this;
787  }

◆ setCookie()

setCookie (   $cookieName,
  $cookieValue = null 
)
Parameters
string$name
string$value
Returns
Zend_Soap_Client

Definition at line 1236 of file Client.php.

1237  {
1238  $soapClient = $this->getSoapClient();
1239  $soapClient->__setCookie($cookieName, $cookieValue);
1240  return $this;
1241  }

◆ setEncoding()

setEncoding (   $encoding)

Set encoding

Parameters
string$encoding
Returns
Zend_Soap_Client
Exceptions
Zend_Soap_Client_Exceptionwith invalid encoding argument

Definition at line 413 of file Client.php.

414  {
415  if (!is_string($encoding)) {
416  #require_once 'Zend/Soap/Client/Exception.php';
417  throw new Zend_Soap_Client_Exception('Invalid encoding specified');
418  }
419 
420  $this->_encoding = $encoding;
421 
422  $this->_soapClient = null;
423 
424  return $this;
425  }

◆ setEncodingMethod()

setEncodingMethod (   $use)

Set message encoding method

Parameters
int$useOne of the SOAP_ENCODED or SOAP_LITERAL constants
Returns
Zend_Soap_Client
Exceptions
Zend_Soap_Client_Exceptionwith invalid message encoding method argument

Definition at line 552 of file Client.php.

553  {
554  if (!in_array($use, array(SOAP_ENCODED, SOAP_LITERAL))) {
555  #require_once 'Zend/Soap/Client/Exception.php';
556  throw new Zend_Soap_Client_Exception('Invalid message encoding method. Use SOAP_ENCODED or SOAP_LITERAL constants.');
557  }
558 
559  $this->_use = $use;
560 
561  $this->_soapClient = null;
562 
563  return $this;
564  }

◆ setExceptions()

setExceptions (   $exceptions)

Set the exceptions option

The exceptions option is a boolean value defining whether soap errors throw exceptions.

See also
http://php.net/manual/soapclient.soapclient.php#refsect1-soapclient.soapclient-parameters
Parameters
bool$exceptions
Returns
$this

Definition at line 927 of file Client.php.

928  {
929  $this->_exceptions = (bool) $exceptions;
930 
931  return $this;
932  }

◆ setHttpLogin()

setHttpLogin (   $login)

Set HTTP login

Parameters
string$login
Returns
Zend_Soap_Client

Definition at line 582 of file Client.php.

583  {
584  $this->_login = $login;
585 
586  $this->_soapClient = null;
587 
588  return $this;
589  }

◆ setHttpPassword()

setHttpPassword (   $password)

Set HTTP password

Parameters
string$password
Returns
Zend_Soap_Client

Definition at line 607 of file Client.php.

608  {
609  $this->_password = $password;
610 
611  $this->_soapClient = null;
612 
613  return $this;
614  }

◆ setHttpsCertificate()

setHttpsCertificate (   $localCert)

Set HTTPS client certificate path

Parameters
string$localCertlocal certificate path
Returns
Zend_Soap_Client
Exceptions
Zend_Soap_Client_Exceptionwith invalid local certificate path argument

Definition at line 723 of file Client.php.

724  {
725  if (!is_readable($localCert)) {
726  #require_once 'Zend/Soap/Client/Exception.php';
727  throw new Zend_Soap_Client_Exception('Invalid HTTPS client certificate path.');
728  }
729 
730  $this->_local_cert = $localCert;
731 
732  $this->_soapClient = null;
733 
734  return $this;
735  }

◆ setHttpsCertPassphrase()

setHttpsCertPassphrase (   $passphrase)

Set HTTPS client certificate passphrase

Parameters
string$passphrase
Returns
Zend_Soap_Client

Definition at line 753 of file Client.php.

754  {
755  $this->_passphrase = $passphrase;
756 
757  $this->_soapClient = null;
758 
759  return $this;
760  }

◆ setLocation()

setLocation (   $location)

Set Location

URI in Web Service the target namespace

Parameters
string$location
Returns
Zend_Soap_Client
Exceptions
Zend_Soap_Client_Exceptionwith invalid uri argument

Definition at line 494 of file Client.php.

495  {
496  $this->validateUrn($location);
497  $this->_location = $location;
498 
499  $this->_soapClient = null;
500 
501  return $this;
502  }
validateUrn($urn)
Definition: Client.php:444

◆ setOptions()

setOptions (   $options)

Set Options

Allows setting options as an associative array of option => value pairs.

Parameters
array | Zend_Config$options
Returns
Zend_Soap_Client
Exceptions
Zend_SoapClient_Exception

Definition at line 197 of file Client.php.

198  {
199  if($options instanceof Zend_Config) {
200  $options = $options->toArray();
201  }
202 
203  foreach ($options as $key => $value) {
204  switch ($key) {
205  case 'classmap':
206  case 'classMap':
207  $this->setClassmap($value);
208  break;
209  case 'encoding':
210  $this->setEncoding($value);
211  break;
212  case 'soapVersion':
213  case 'soap_version':
214  $this->setSoapVersion($value);
215  break;
216  case 'wsdl':
217  $this->setWsdl($value);
218  break;
219  case 'uri':
220  $this->setUri($value);
221  break;
222  case 'location':
223  $this->setLocation($value);
224  break;
225  case 'style':
226  $this->setStyle($value);
227  break;
228  case 'use':
229  $this->setEncodingMethod($value);
230  break;
231  case 'login':
232  $this->setHttpLogin($value);
233  break;
234  case 'password':
235  $this->setHttpPassword($value);
236  break;
237  case 'proxy_host':
238  $this->setProxyHost($value);
239  break;
240  case 'proxy_port':
241  $this->setProxyPort($value);
242  break;
243  case 'proxy_login':
244  $this->setProxyLogin($value);
245  break;
246  case 'proxy_password':
247  $this->setProxyPassword($value);
248  break;
249  case 'local_cert':
250  $this->setHttpsCertificate($value);
251  break;
252  case 'passphrase':
254  break;
255  case 'compression':
257  break;
258  case 'stream_context':
259  $this->setStreamContext($value);
260  break;
261  case 'features':
262  $this->setSoapFeatures($value);
263  break;
264  case 'cache_wsdl':
265  $this->setWsdlCache($value);
266  break;
267  case 'useragent':
268  case 'userAgent':
269  case 'user_agent':
270  $this->setUserAgent($value);
271  break;
272  case 'exceptions':
273  $this->setExceptions($value);
274  break;
275 
276  // Not used now
277  // case 'connection_timeout':
278  // $this->_connection_timeout = $value;
279  // break;
280 
281  default:
282  #require_once 'Zend/Soap/Client/Exception.php';
283  throw new Zend_Soap_Client_Exception('Unknown SOAP client option');
284  break;
285  }
286  }
287 
288  return $this;
289  }
setLocation($location)
Definition: Client.php:494
setProxyLogin($proxyLogin)
Definition: Client.php:682
setHttpsCertificate($localCert)
Definition: Client.php:723
setWsdl($wsdl)
Definition: Client.php:170
setStyle($style)
Definition: Client.php:521
setStreamContext($context)
Definition: Client.php:814
setHttpLogin($login)
Definition: Client.php:582
setClassmap(array $classmap)
Definition: Client.php:380
setEncodingMethod($use)
Definition: Client.php:552
setHttpsCertPassphrase($passphrase)
Definition: Client.php:753
setSoapVersion($version)
Definition: Client.php:350
setWsdlCache($caching)
Definition: Client.php:870
setProxyPassword($proxyPassword)
Definition: Client.php:707
$value
Definition: gender.phtml:16
setEncoding($encoding)
Definition: Client.php:413
setExceptions($exceptions)
Definition: Client.php:927
setCompressionOptions($compressionOptions)
Definition: Client.php:778
setSoapFeatures($feature)
Definition: Client.php:846
setProxyPort($proxyPort)
Definition: Client.php:657
setHttpPassword($password)
Definition: Client.php:607
setUserAgent($userAgent)
Definition: Client.php:896
setProxyHost($proxyHost)
Definition: Client.php:632

◆ setProxyHost()

setProxyHost (   $proxyHost)

Set proxy host

Parameters
string$proxyHost
Returns
Zend_Soap_Client

Definition at line 632 of file Client.php.

633  {
634  $this->_proxy_host = $proxyHost;
635 
636  $this->_soapClient = null;
637 
638  return $this;
639  }

◆ setProxyLogin()

setProxyLogin (   $proxyLogin)

Set proxy login

Parameters
string$proxyLogin
Returns
Zend_Soap_Client

Definition at line 682 of file Client.php.

683  {
684  $this->_proxy_login = $proxyLogin;
685 
686  $this->_soapClient = null;
687 
688  return $this;
689  }

◆ setProxyPassword()

setProxyPassword (   $proxyPassword)

Set proxy password

Parameters
string$proxyLogin
Returns
Zend_Soap_Client

Definition at line 707 of file Client.php.

708  {
709  $this->_proxy_password = $proxyPassword;
710 
711  $this->_soapClient = null;
712 
713  return $this;
714  }

◆ setProxyPort()

setProxyPort (   $proxyPort)

Set proxy port

Parameters
int$proxyPort
Returns
Zend_Soap_Client

Definition at line 657 of file Client.php.

658  {
659  $this->_proxy_port = (int)$proxyPort;
660 
661  $this->_soapClient = null;
662 
663  return $this;
664  }

◆ setSoapClient()

setSoapClient ( SoapClient  $soapClient)
Parameters
SoapClient$soapClient
Returns
Zend_Soap_Client

Definition at line 1214 of file Client.php.

1215  {
1216  $this->_soapClient = $soapClient;
1217  return $this;
1218  }

◆ setSoapFeatures()

setSoapFeatures (   $feature)

Set the SOAP Feature options.

Parameters
string | int$feature
Returns
Zend_Soap_Client

Definition at line 846 of file Client.php.

847  {
848  $this->_features = $feature;
849 
850  $this->_soapClient = null;
851  return $this;
852  }

◆ setSoapVersion()

setSoapVersion (   $version)

Set SOAP version

Parameters
int$versionOne of the SOAP_1_1 or SOAP_1_2 constants
Returns
Zend_Soap_Client
Exceptions
Zend_Soap_Client_Exceptionwith invalid soap version argument

Definition at line 350 of file Client.php.

351  {
352  if (!in_array($version, array(SOAP_1_1, SOAP_1_2))) {
353  #require_once 'Zend/Soap/Client/Exception.php';
354  throw new Zend_Soap_Client_Exception('Invalid soap version specified. Use SOAP_1_1 or SOAP_1_2 constants.');
355  }
356  $this->_soapVersion = $version;
357 
358  $this->_soapClient = null;
359 
360  return $this;
361  }

◆ setStreamContext()

setStreamContext (   $context)

Set Stream Context

Returns
Zend_Soap_Client
See also
Zend_Soap_Client_Exception

Definition at line 814 of file Client.php.

815  {
816  if(!is_resource($context) || get_resource_type($context) !== "stream-context") {
820  #require_once "Zend/Soap/Client/Exception.php";
821  throw new Zend_Soap_Client_Exception(
822  "Invalid stream context resource given."
823  );
824  }
825 
826  $this->_stream_context = $context;
827  return $this;
828  }

◆ setStyle()

setStyle (   $style)

Set request style

Parameters
int$styleOne of the SOAP_RPC or SOAP_DOCUMENT constants
Returns
Zend_Soap_Client
Exceptions
Zend_Soap_Client_Exceptionwith invalid style argument

Definition at line 521 of file Client.php.

522  {
523  if (!in_array($style, array(SOAP_RPC, SOAP_DOCUMENT))) {
524  #require_once 'Zend/Soap/Client/Exception.php';
525  throw new Zend_Soap_Client_Exception('Invalid request style specified. Use SOAP_RPC or SOAP_DOCUMENT constants.');
526  }
527 
528  $this->_style = $style;
529 
530  $this->_soapClient = null;
531 
532  return $this;
533  }

◆ setUri()

setUri (   $uri)

Set URI

URI in Web Service the target namespace

Parameters
string$uri
Returns
Zend_Soap_Client
Exceptions
Zend_Soap_Client_Exceptionwith invalid uri argument

Definition at line 465 of file Client.php.

466  {
467  $this->validateUrn($uri);
468  $this->_uri = $uri;
469 
470  $this->_soapClient = null;
471 
472  return $this;
473  }
validateUrn($urn)
Definition: Client.php:444

◆ setUserAgent()

setUserAgent (   $userAgent)

Set the string to use in User-Agent header

Parameters
string | null$userAgent
Returns
Zend_Soap_Client

Definition at line 896 of file Client.php.

897  {
898  if ($userAgent === null) {
899  $this->_user_agent = null;
900  } else {
901  $this->_user_agent = (string)$userAgent;
902  }
903  return $this;
904  }

◆ setWsdl()

setWsdl (   $wsdl)

Set wsdl

Parameters
string$wsdl
Returns
Zend_Soap_Client

Definition at line 170 of file Client.php.

171  {
172  $this->_wsdl = $wsdl;
173  $this->_soapClient = null;
174 
175  return $this;
176  }

◆ setWsdlCache()

setWsdlCache (   $caching)

Set the SOAP Wsdl Caching Options

Parameters
string | int | boolean | null$caching
Returns
Zend_Soap_Client

Definition at line 870 of file Client.php.

871  {
872  if ($caching === null) {
873  $this->_cache_wsdl = null;
874  } else {
875  $this->_cache_wsdl = (int)$caching;
876  }
877  return $this;
878  }

◆ validateUrn()

validateUrn (   $urn)

Check for valid URN

Parameters
string$urn
Returns
true
Exceptions
Zend_Soap_Client_Exceptionon invalid URN

Definition at line 444 of file Client.php.

445  {
446  $scheme = parse_url($urn, PHP_URL_SCHEME);
447  if ($scheme === false || $scheme === null) {
448  #require_once 'Zend/Soap/Client/Exception.php';
449  throw new Zend_Soap_Client_Exception('Invalid URN');
450  }
451 
452  return true;
453 
454  }

Field Documentation

◆ $_cache_wsdl

$_cache_wsdl = null
protected

Definition at line 90 of file Client.php.

◆ $_classmap

$_classmap = null
protected

Definition at line 59 of file Client.php.

◆ $_compression

$_compression = null
protected

Definition at line 86 of file Client.php.

◆ $_connection_timeout

$_connection_timeout = null
protected

Definition at line 87 of file Client.php.

◆ $_encoding

$_encoding = 'UTF-8'
protected

Definition at line 53 of file Client.php.

◆ $_exceptions

$_exceptions = null
protected

Definition at line 92 of file Client.php.

◆ $_faultExceptions

$_faultExceptions = array()
protected

Definition at line 65 of file Client.php.

◆ $_features

$_features = null
protected

Definition at line 89 of file Client.php.

◆ $_lastMethod

$_lastMethod = ''
protected

Definition at line 114 of file Client.php.

◆ $_local_cert

$_local_cert = null
protected

Definition at line 84 of file Client.php.

◆ $_location

$_location = null
protected

Definition at line 75 of file Client.php.

◆ $_login

$_login = null
protected

Definition at line 78 of file Client.php.

◆ $_passphrase

$_passphrase = null
protected

Definition at line 85 of file Client.php.

◆ $_password

$_password = null
protected

Definition at line 79 of file Client.php.

◆ $_permanentSoapInputHeaders

$_permanentSoapInputHeaders = array()
protected

Definition at line 132 of file Client.php.

◆ $_proxy_host

$_proxy_host = null
protected

Definition at line 80 of file Client.php.

◆ $_proxy_login

$_proxy_login = null
protected

Definition at line 82 of file Client.php.

◆ $_proxy_password

$_proxy_password = null
protected

Definition at line 83 of file Client.php.

◆ $_proxy_port

$_proxy_port = null
protected

Definition at line 81 of file Client.php.

◆ $_soapClient

$_soapClient
protected

Definition at line 107 of file Client.php.

◆ $_soapInputHeaders

$_soapInputHeaders = array()
protected

Definition at line 123 of file Client.php.

◆ $_soapOutputHeaders

$_soapOutputHeaders = array()
protected

Definition at line 141 of file Client.php.

◆ $_soapVersion

$_soapVersion = SOAP_1_2
protected

Definition at line 71 of file Client.php.

◆ $_stream_context

$_stream_context = null
protected

Definition at line 88 of file Client.php.

◆ $_style

$_style = null
protected

Definition at line 76 of file Client.php.

◆ $_uri

$_uri = null
protected

Set of other SoapClient options

Definition at line 74 of file Client.php.

◆ $_use

$_use = null
protected

Definition at line 77 of file Client.php.

◆ $_user_agent

$_user_agent = null
protected

Definition at line 91 of file Client.php.

◆ $_wsdl

$_wsdl = null
protected

Definition at line 100 of file Client.php.


The documentation for this class was generated from the following file: