Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions | Protected Attributes
Zend_Soap_Server Class Reference
Inheritance diagram for Zend_Soap_Server:
Zend_Server_Interface

Public Member Functions

 __construct ($wsdl=null, array $options=null)
 
 setOptions ($options)
 
 getOptions ()
 
 setWsiCompliant ($value)
 
 getWsiCompliant ()
 
 setEncoding ($encoding)
 
 getEncoding ()
 
 setSoapVersion ($version)
 
 getSoapVersion ()
 
 validateUrn ($urn)
 
 setActor ($actor)
 
 getActor ()
 
 setUri ($uri)
 
 getUri ()
 
 setClassmap ($classmap)
 
 getClassmap ()
 
 setWsdl ($wsdl)
 
 getWsdl ()
 
 setSoapFeatures ($feature)
 
 getSoapFeatures ()
 
 setWsdlCache ($options)
 
 getWsdlCache ()
 
 addFunction ($function, $namespace='')
 
 setClass ($class, $namespace='', $argv=null)
 
 setObject ($object)
 
 getFunctions ()
 
 loadFunctions ($definition)
 
 setPersistence ($mode)
 
 getPersistence ()
 
 getLastRequest ()
 
 setReturnResponse ($flag)
 
 getReturnResponse ()
 
 getLastResponse ()
 
 handle ($request=null)
 
 registerFaultException ($class)
 
 deregisterFaultException ($class)
 
 getFaultExceptions ()
 
 fault ($fault=null, $code="Receiver")
 
 handlePhpErrors ($errno, $errstr, $errfile=null, $errline=null, array $errcontext=null)
 

Protected Member Functions

 _setRequest ($request)
 
 _getSoap ()
 
 _initializeSoapErrorContext ()
 

Protected Attributes

 $_actor
 
 $_class
 
 $_classArgs = array()
 
 $_object
 
 $_classmap
 
 $_encoding
 
 $_features
 
 $_wsdlCache
 
 $_wsiCompliant
 
 $_faultExceptions = array()
 
 $_functions = array()
 
 $_persistence
 
 $_request
 
 $_response
 
 $_returnResponse = false
 
 $_soapVersion = SOAP_1_2
 
 $_wsdl
 
 $_uri
 

Detailed Description

Definition at line 44 of file Server.php.

Constructor & Destructor Documentation

◆ __construct()

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

Constructor

Sets display_errors INI setting to off (prevent client errors due to bad XML in response). Registers handlePhpErrors() as error handler for E_USER_ERROR.

If $wsdl is provided, it is passed on to setWsdl(); if any options are specified, they are passed on to setOptions().

Parameters
string$wsdl
array$options
Returns
void

Definition at line 172 of file Server.php.

173  {
174  if (!extension_loaded('soap')) {
175  #require_once 'Zend/Soap/Server/Exception.php';
176  throw new Zend_Soap_Server_Exception('SOAP extension is not loaded.');
177  }
178 
179  if (null !== $wsdl) {
180  $this->setWsdl($wsdl);
181  }
182 
183  if (null !== $options) {
184  $this->setOptions($options);
185  }
186  }
setWsdl($wsdl)
Definition: Server.php:478
setOptions($options)
Definition: Server.php:196

Member Function Documentation

◆ _getSoap()

_getSoap ( )
protected

Get SoapServer object

Uses $_wsdl and return value of getOptions() to instantiate SoapServer object, and then registers any functions or class with it, as well as peristence.

Returns
SoapServer

Definition at line 811 of file Server.php.

812  {
813  $options = $this->getOptions();
814  $server = new SoapServer($this->_wsdl, $options);
815 
816  if (!empty($this->_functions)) {
817  $server->addFunction($this->_functions);
818  }
819 
820  if (!empty($this->_class)) {
821  $args = $this->_classArgs;
822  array_unshift($args, $this->_class);
823  if ($this->_wsiCompliant) {
824  #require_once 'Zend/Soap/Server/Proxy.php';
825  array_unshift($args, 'Zend_Soap_Server_Proxy');
826  }
827  call_user_func_array(array($server, 'setClass'), $args);
828  }
829 
830  if (!empty($this->_object)) {
831  $server->setObject($this->_object);
832  }
833 
834  if (null !== $this->_persistence) {
835  $server->setPersistence($this->_persistence);
836  }
837 
838  return $server;
839  }

◆ _initializeSoapErrorContext()

_initializeSoapErrorContext ( )
protected

Method initalizes the error context that the SOAPServer enviroment will run in.

Returns
boolean display_errors original value

Definition at line 918 of file Server.php.

919  {
920  $displayErrorsOriginalState = ini_get('display_errors');
921  ini_set('display_errors', false);
922  set_error_handler(array($this, 'handlePhpErrors'), E_USER_ERROR);
923  return $displayErrorsOriginalState;
924  }
ini_set($varName, $newValue)

◆ _setRequest()

_setRequest (   $request)
protected

Set request

$request may be any of:

  • DOMDocument; if so, then cast to XML
  • DOMNode; if so, then grab owner document and cast to XML
  • SimpleXMLElement; if so, then cast to XML
  • stdClass; if so, calls __toString() and verifies XML
  • string; if so, verifies XML
Parameters
DOMDocument | DOMNode | SimpleXMLElement | stdClass | string$request
Returns
Zend_Soap_Server

Definition at line 723 of file Server.php.

724  {
725  if ($request instanceof DOMDocument) {
726  $xml = $request->saveXML();
727  } elseif ($request instanceof DOMNode) {
728  $xml = $request->ownerDocument->saveXML();
729  } elseif ($request instanceof SimpleXMLElement) {
730  $xml = $request->asXML();
731  } elseif (is_object($request) || is_string($request)) {
732  if (is_object($request)) {
733  $xml = $request->__toString();
734  } else {
735  $xml = $request;
736  }
737 
738  $dom = new DOMDocument();
739  try {
740  if(strlen($xml) == 0 || (!$dom = Zend_Xml_Security::scan($xml, $dom))) {
741  #require_once 'Zend/Soap/Server/Exception.php';
742  throw new Zend_Soap_Server_Exception('Invalid XML');
743  }
744  } catch (Zend_Xml_Exception $e) {
745  #require_once 'Zend/Soap/Server/Exception.php';
746  throw new Zend_Soap_Server_Exception(
747  $e->getMessage()
748  );
749  }
750  }
751  $this->_request = $xml;
752  return $this;
753  }
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
static scan($xml, DOMDocument $dom=null)
Definition: Security.php:71

◆ addFunction()

addFunction (   $function,
  $namespace = '' 
)

Attach a function as a server method

Parameters
array | string$functionFunction name, array of function names to attach, or SOAP_FUNCTIONS_ALL to attach all functions
string$namespaceIgnored
Returns
Zend_Soap_Server
Exceptions
Zend_Soap_Server_Exceptionon invalid functions

Implements Zend_Server_Interface.

Definition at line 545 of file Server.php.

546  {
547  // Bail early if set to SOAP_FUNCTIONS_ALL
548  if ($this->_functions == SOAP_FUNCTIONS_ALL) {
549  return $this;
550  }
551 
552  if (is_array($function)) {
553  foreach ($function as $func) {
554  if (is_string($func) && function_exists($func)) {
555  $this->_functions[] = $func;
556  } else {
557  #require_once 'Zend/Soap/Server/Exception.php';
558  throw new Zend_Soap_Server_Exception('One or more invalid functions specified in array');
559  }
560  }
561  $this->_functions = array_merge($this->_functions, $function);
562  } elseif (is_string($function) && function_exists($function)) {
563  $this->_functions[] = $function;
564  } elseif ($function == SOAP_FUNCTIONS_ALL) {
565  $this->_functions = SOAP_FUNCTIONS_ALL;
566  } else {
567  #require_once 'Zend/Soap/Server/Exception.php';
568  throw new Zend_Soap_Server_Exception('Invalid function specified');
569  }
570 
571  if (is_array($this->_functions)) {
572  $this->_functions = array_unique($this->_functions);
573  }
574 
575  return $this;
576  }
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17

◆ deregisterFaultException()

deregisterFaultException (   $class)

Deregister a fault exception from the fault exception stack

Parameters
string$class
Returns
boolean

Definition at line 944 of file Server.php.

945  {
946  if (in_array($class, $this->_faultExceptions, true)) {
947  $index = array_search($class, $this->_faultExceptions);
948  unset($this->_faultExceptions[$index]);
949  return true;
950  }
951 
952  return false;
953  }
$_option $_optionId $class
Definition: date.phtml:13
$index
Definition: list.phtml:44

◆ fault()

fault (   $fault = null,
  $code = "Receiver" 
)

Generate a server fault

Note that the arguments are reverse to those of SoapFault.

If an exception is passed as the first argument, its message and code will be used to create the fault object if it has been registered via {@Link registerFaultException()}.

string|Exception $fault string $code SOAP Fault Codes SoapFault

Implements Zend_Server_Interface.

Definition at line 979 of file Server.php.

980  {
981  if ($fault instanceof Exception) {
982  $class = get_class($fault);
983  if (in_array($class, $this->_faultExceptions)) {
984  $message = $fault->getMessage();
985  $eCode = $fault->getCode();
986  $code = empty($eCode) ? $code : $eCode;
987  } else {
988  $message = 'Unknown error';
989  }
990  } elseif(is_string($fault)) {
991  $message = $fault;
992  } else {
993  $message = 'Unknown error';
994  }
995 
996  $allowedFaultModes = array(
997  'VersionMismatch', 'MustUnderstand', 'DataEncodingUnknown',
998  'Sender', 'Receiver', 'Server'
999  );
1000  if(!in_array($code, $allowedFaultModes)) {
1001  $code = "Receiver";
1002  }
1003 
1004  return new SoapFault($code, $message);
1005  }
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
$message
$_option $_optionId $class
Definition: date.phtml:13
$code
Definition: info.phtml:12

◆ getActor()

getActor ( )

Retrieve actor

Returns
string

Definition at line 401 of file Server.php.

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

◆ getClassmap()

getClassmap ( )

Retrieve classmap

Returns
mixed

Definition at line 467 of file Server.php.

468  {
469  return $this->_classmap;
470  }

◆ getEncoding()

getEncoding ( )

Get encoding

Returns
string

Definition at line 330 of file Server.php.

331  {
332  return $this->_encoding;
333  }

◆ getFaultExceptions()

getFaultExceptions ( )

Return fault exceptions list

Returns
array

Definition at line 960 of file Server.php.

961  {
963  }

◆ getFunctions()

getFunctions ( )

Return a server definition array

Returns a list of all functions registered with addFunction(), merged with all public methods of the class set with setClass() (if any).

@access public

Returns
array

Implements Zend_Server_Interface.

Definition at line 658 of file Server.php.

659  {
660  $functions = array();
661  if (null !== $this->_class) {
662  $functions = get_class_methods($this->_class);
663  } elseif (null !== $this->_object) {
664  $functions = get_class_methods($this->_object);
665  }
666 
667  return array_merge((array) $this->_functions, $functions);
668  }
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17

◆ getLastRequest()

getLastRequest ( )

Retrieve request XML

Returns
string

Definition at line 760 of file Server.php.

761  {
762  return $this->_request;
763  }

◆ getLastResponse()

getLastResponse ( )

Get response XML

Returns
string

Definition at line 797 of file Server.php.

798  {
799  return $this->_response;
800  }

◆ getOptions()

getOptions ( )

Return array of options suitable for using with SoapServer constructor

Returns
array

Definition at line 248 of file Server.php.

249  {
250  $options = array();
251  if (null !== $this->_actor) {
252  $options['actor'] = $this->_actor;
253  }
254 
255  if (null !== $this->_classmap) {
256  $options['classmap'] = $this->_classmap;
257  }
258 
259  if (null !== $this->_encoding) {
260  $options['encoding'] = $this->_encoding;
261  }
262 
263  if (null !== $this->_soapVersion) {
264  $options['soap_version'] = $this->_soapVersion;
265  }
266 
267  if (null !== $this->_uri) {
268  $options['uri'] = $this->_uri;
269  }
270 
271  if (null !== $this->_features) {
272  $options['features'] = $this->_features;
273  }
274 
275  if (null !== $this->_wsdlCache) {
276  $options['cache_wsdl'] = $this->_wsdlCache;
277  }
278 
279  if (null !== $this->_wsiCompliant) {
280  $options['wsi_compliant'] = $this->_wsiCompliant;
281  }
282 
283  return $options;
284  }

◆ getPersistence()

getPersistence ( )

Get server persistence

Returns
Zend_Soap_Server

Definition at line 705 of file Server.php.

706  {
707  return $this->_persistence;
708  }

◆ getReturnResponse()

getReturnResponse ( )

Retrieve return response flag

Returns
boolean

Definition at line 787 of file Server.php.

788  {
789  return $this->_returnResponse;
790  }

◆ getSoapFeatures()

getSoapFeatures ( )

Return current SOAP Features options

Returns
int

Definition at line 511 of file Server.php.

512  {
513  return $this->_features;
514  }

◆ getSoapVersion()

getSoapVersion ( )

Get SOAP version

Returns
int

Definition at line 358 of file Server.php.

359  {
360  return $this->_soapVersion;
361  }

◆ getUri()

getUri ( )

Retrieve URI

Returns
string

Definition at line 427 of file Server.php.

428  {
429  return $this->_uri;
430  }

◆ getWsdl()

getWsdl ( )

Retrieve wsdl

Returns
string

Definition at line 489 of file Server.php.

490  {
491  return $this->_wsdl;
492  }

◆ getWsdlCache()

getWsdlCache ( )

Get current SOAP Wsdl Caching option

Definition at line 531 of file Server.php.

532  {
533  return $this->_wsdlCache;
534  }

◆ getWsiCompliant()

getWsiCompliant ( )

Gt WS-I compliant

Returns
boolean

Definition at line 303 of file Server.php.

304  {
305  return $this->_wsiCompliant;
306  }

◆ handle()

handle (   $request = null)

Handle a request

Instantiates SoapServer object with options set in object, and dispatches its handle() method.

$request may be any of:

  • DOMDocument; if so, then cast to XML
  • DOMNode; if so, then grab owner document and cast to XML
  • SimpleXMLElement; if so, then cast to XML
  • stdClass; if so, calls __toString() and verifies XML
  • string; if so, verifies XML

If no request is passed, pulls request using php:://input (for cross-platform compatability purposes).

Parameters
DOMDocument | DOMNode | SimpleXMLElement | stdClass | string$requestOptional request
Returns
void|string
See also
Zend_Soap_Server_Exception

Implements Zend_Server_Interface.

Definition at line 860 of file Server.php.

861  {
862  if (null === $request) {
863  $request = file_get_contents('php://input');
864  }
865 
866  // Set Zend_Soap_Server error handler
867  $displayErrorsOriginalState = $this->_initializeSoapErrorContext();
868 
869  $setRequestException = null;
873  #require_once 'Zend/Soap/Server/Exception.php';
874  try {
875  $this->_setRequest($request);
876  } catch (Zend_Soap_Server_Exception $e) {
877  $setRequestException = $e;
878  }
879 
880  $soap = $this->_getSoap();
881 
882  $fault = false;
883  ob_start();
884  if ($setRequestException instanceof Exception) {
885  // Create SOAP fault message if we've caught a request exception
886  $fault = $this->fault($setRequestException->getMessage(), 'Sender');
887  } else {
888  try {
889  $soap->handle($this->_request);
890  } catch (Exception $e) {
891  $fault = $this->fault($e);
892  }
893  }
894  $this->_response = ob_get_clean();
895 
896  // Restore original error handler
897  restore_error_handler();
898  ini_set('display_errors', $displayErrorsOriginalState);
899 
900  // Send a fault, if we have one
901  if ($fault) {
902  $soap->fault($fault->faultcode, $fault->faultstring);
903  }
904 
905  if (!$this->_returnResponse) {
906  echo $this->_response;
907  return;
908  }
909 
910  return $this->_response;
911  }
ini_set($varName, $newValue)
_setRequest($request)
Definition: Server.php:723
fault($fault=null, $code="Receiver")
Definition: Server.php:979
_initializeSoapErrorContext()
Definition: Server.php:918

◆ handlePhpErrors()

handlePhpErrors (   $errno,
  $errstr,
  $errfile = null,
  $errline = null,
array  $errcontext = null 
)

Throw PHP errors as SoapFaults

Parameters
int$errno
string$errstr
string$errfile
int$errline
array$errcontext
Returns
void
Exceptions
SoapFault

Definition at line 1018 of file Server.php.

1019  {
1020  throw $this->fault($errstr, "Receiver");
1021  }
fault($fault=null, $code="Receiver")
Definition: Server.php:979

◆ loadFunctions()

loadFunctions (   $definition)

Unimplemented: Load server definition

Parameters
array$array
Returns
void
Exceptions
Zend_Soap_Server_ExceptionUnimplemented

Implements Zend_Server_Interface.

Definition at line 677 of file Server.php.

678  {
679  #require_once 'Zend/Soap/Server/Exception.php';
680  throw new Zend_Soap_Server_Exception('Unimplemented');
681  }

◆ registerFaultException()

registerFaultException (   $class)

Register a valid fault exception

Parameters
string | array$classException class or array of exception classes
Returns
Zend_Soap_Server

Definition at line 932 of file Server.php.

933  {
934  $this->_faultExceptions = array_merge($this->_faultExceptions, (array) $class);
935  return $this;
936  }
$_option $_optionId $class
Definition: date.phtml:13

◆ setActor()

setActor (   $actor)

Set actor

Actor is the actor URI for the server.

Parameters
string$actor
Returns
Zend_Soap_Server

Definition at line 389 of file Server.php.

390  {
391  $this->validateUrn($actor);
392  $this->_actor = $actor;
393  return $this;
394  }
validateUrn($urn)
Definition: Server.php:370

◆ setClass()

setClass (   $class,
  $namespace = '',
  $argv = null 
)

Attach a class to a server

Accepts a class name to use when handling requests. Any additional arguments will be passed to that class' constructor when instantiated.

See setObject() to set preconfigured object instances as request handlers.

Parameters
string$classClass Name which executes SOAP Requests at endpoint.
Returns
Zend_Soap_Server
Exceptions
Zend_Soap_Server_Exceptionif called more than once, or if class does not exist

Implements Zend_Server_Interface.

Definition at line 591 of file Server.php.

592  {
593  if (isset($this->_class)) {
594  #require_once 'Zend/Soap/Server/Exception.php';
595  throw new Zend_Soap_Server_Exception('A class has already been registered with this soap server instance');
596  }
597 
598  if (!is_string($class)) {
599  #require_once 'Zend/Soap/Server/Exception.php';
600  throw new Zend_Soap_Server_Exception('Invalid class argument (' . gettype($class) . ')');
601  }
602 
603  if (!class_exists($class)) {
604  #require_once 'Zend/Soap/Server/Exception.php';
605  throw new Zend_Soap_Server_Exception('Class "' . $class . '" does not exist');
606  }
607 
608  $this->_class = $class;
609  if (1 < func_num_args()) {
610  $argv = func_get_args();
611  array_shift($argv);
612  $this->_classArgs = $argv;
613  }
614 
615  return $this;
616  }
$_option $_optionId $class
Definition: date.phtml:13

◆ setClassmap()

setClassmap (   $classmap)

Set classmap

Parameters
array$classmap
Returns
Zend_Soap_Server
Exceptions
Zend_Soap_Server_Exceptionfor any invalid class in the class map
See also
Zend_Soap_Server_Exception
Zend_Soap_Server_Exception

Definition at line 439 of file Server.php.

440  {
441  if (!is_array($classmap)) {
445  #require_once 'Zend/Soap/Server/Exception.php';
446  throw new Zend_Soap_Server_Exception('Classmap must be an array');
447  }
448  foreach ($classmap as $type => $class) {
449  if (!class_exists($class)) {
453  #require_once 'Zend/Soap/Server/Exception.php';
454  throw new Zend_Soap_Server_Exception('Invalid class in class map');
455  }
456  }
457 
458  $this->_classmap = $classmap;
459  return $this;
460  }
$type
Definition: item.phtml:13
$_option $_optionId $class
Definition: date.phtml:13

◆ setEncoding()

setEncoding (   $encoding)

Set encoding

Parameters
string$encoding
Returns
Zend_Soap_Server
Exceptions
Zend_Soap_Server_Exceptionwith invalid encoding argument

Definition at line 314 of file Server.php.

315  {
316  if (!is_string($encoding)) {
317  #require_once 'Zend/Soap/Server/Exception.php';
318  throw new Zend_Soap_Server_Exception('Invalid encoding specified');
319  }
320 
321  $this->_encoding = $encoding;
322  return $this;
323  }

◆ setObject()

setObject (   $object)

Attach an object to a server

Accepts an instanciated object to use when handling requests.

Parameters
object$object
Returns
Zend_Soap_Server

Definition at line 626 of file Server.php.

627  {
628  if(!is_object($object)) {
629  #require_once 'Zend/Soap/Server/Exception.php';
630  throw new Zend_Soap_Server_Exception('Invalid object argument ('.gettype($object).')');
631  }
632 
633  if(isset($this->_object)) {
634  #require_once 'Zend/Soap/Server/Exception.php';
635  throw new Zend_Soap_Server_Exception('An object has already been registered with this soap server instance');
636  }
637 
638  if ($this->_wsiCompliant) {
639  #require_once 'Zend/Soap/Server/Proxy.php';
640  $this->_object = new Zend_Soap_Server_Proxy($object);
641  } else {
642  $this->_object = $object;
643  }
644 
645  return $this;
646  }

◆ setOptions()

setOptions (   $options)

Set Options

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

Parameters
array | Zend_Config$options
Returns
Zend_Soap_Server

Definition at line 196 of file Server.php.

197  {
198  if($options instanceof Zend_Config) {
199  $options = $options->toArray();
200  }
201 
202  foreach ($options as $key => $value) {
203  switch ($key) {
204  case 'actor':
205  $this->setActor($value);
206  break;
207  case 'classmap':
208  case 'classMap':
209  $this->setClassmap($value);
210  break;
211  case 'encoding':
212  $this->setEncoding($value);
213  break;
214  case 'soapVersion':
215  case 'soap_version':
216  $this->setSoapVersion($value);
217  break;
218  case 'uri':
219  $this->setUri($value);
220  break;
221  case 'wsdl':
222  $this->setWsdl($value);
223  break;
224  case 'featues':
225  trigger_error(__METHOD__ . ': the option "featues" is deprecated as of 1.10.x and will be removed with 2.0.0; use "features" instead', E_USER_NOTICE);
226  case 'features':
227  $this->setSoapFeatures($value);
228  break;
229  case 'cache_wsdl':
230  $this->setWsdlCache($value);
231  break;
232  case 'wsi_compliant':
233  $this->setWsiCompliant($value);
234  break;
235  default:
236  break;
237  }
238  }
239 
240  return $this;
241  }
setEncoding($encoding)
Definition: Server.php:314
setClassmap($classmap)
Definition: Server.php:439
$value
Definition: gender.phtml:16
setWsdl($wsdl)
Definition: Server.php:478
setSoapVersion($version)
Definition: Server.php:342
setSoapFeatures($feature)
Definition: Server.php:500
setActor($actor)
Definition: Server.php:389
setWsdlCache($options)
Definition: Server.php:522
setWsiCompliant($value)
Definition: Server.php:291

◆ setPersistence()

setPersistence (   $mode)

Set server persistence

Parameters
int$mode
Returns
Zend_Soap_Server

Implements Zend_Server_Interface.

Definition at line 689 of file Server.php.

690  {
691  if (!in_array($mode, array(SOAP_PERSISTENCE_SESSION, SOAP_PERSISTENCE_REQUEST))) {
692  #require_once 'Zend/Soap/Server/Exception.php';
693  throw new Zend_Soap_Server_Exception('Invalid persistence mode specified');
694  }
695 
696  $this->_persistence = $mode;
697  return $this;
698  }
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode
Definition: grid.phtml:15

◆ setReturnResponse()

setReturnResponse (   $flag)

Set return response flag

If true, handle() will return the response instead of automatically sending it back to the requesting client.

The response is always available via getResponse().

Parameters
boolean$flag
Returns
Zend_Soap_Server

Definition at line 776 of file Server.php.

777  {
778  $this->_returnResponse = ($flag) ? true : false;
779  return $this;
780  }

◆ setSoapFeatures()

setSoapFeatures (   $feature)

Set the SOAP Feature options.

Parameters
string | int$feature
Returns
Zend_Soap_Server

Definition at line 500 of file Server.php.

501  {
502  $this->_features = $feature;
503  return $this;
504  }

◆ setSoapVersion()

setSoapVersion (   $version)

Set SOAP version

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

Definition at line 342 of file Server.php.

343  {
344  if (!in_array($version, array(SOAP_1_1, SOAP_1_2))) {
345  #require_once 'Zend/Soap/Server/Exception.php';
346  throw new Zend_Soap_Server_Exception('Invalid soap version specified');
347  }
348 
349  $this->_soapVersion = $version;
350  return $this;
351  }

◆ setUri()

setUri (   $uri)

Set URI

URI in SoapServer is actually the target namespace, not a URI; $uri must begin with 'urn:'.

Parameters
string$uri
Returns
Zend_Soap_Server
Exceptions
Zend_Soap_Server_Exceptionwith invalid uri argument

Definition at line 415 of file Server.php.

416  {
417  $this->validateUrn($uri);
418  $this->_uri = $uri;
419  return $this;
420  }
validateUrn($urn)
Definition: Server.php:370

◆ setWsdl()

setWsdl (   $wsdl)

Set wsdl

Parameters
string$wsdlURI or path to a WSDL
Returns
Zend_Soap_Server

Definition at line 478 of file Server.php.

479  {
480  $this->_wsdl = $wsdl;
481  return $this;
482  }

◆ setWsdlCache()

setWsdlCache (   $options)

Set the SOAP Wsdl Caching Options

Parameters
string | int | boolean$caching
Returns
Zend_Soap_Server

Definition at line 522 of file Server.php.

523  {
524  $this->_wsdlCache = $options;
525  return $this;
526  }

◆ setWsiCompliant()

setWsiCompliant (   $value)

Set WS-I compliant

Parameters
boolean$value
Returns
Zend_Soap_Server

Definition at line 291 of file Server.php.

292  {
293  if (is_bool($value)) {
294  $this->_wsiCompliant = $value;
295  }
296  return $this;
297  }
$value
Definition: gender.phtml:16

◆ validateUrn()

validateUrn (   $urn)

Check for valid URN

Parameters
string$urn
Returns
true
Exceptions
Zend_Soap_Server_Exceptionon invalid URN

Definition at line 370 of file Server.php.

371  {
372  $scheme = parse_url($urn, PHP_URL_SCHEME);
373  if ($scheme === false || $scheme === null) {
374  #require_once 'Zend/Soap/Server/Exception.php';
375  throw new Zend_Soap_Server_Exception('Invalid URN');
376  }
377 
378  return true;
379  }

Field Documentation

◆ $_actor

$_actor
protected

Definition at line 50 of file Server.php.

◆ $_class

$_class
protected

Definition at line 56 of file Server.php.

◆ $_classArgs

$_classArgs = array()
protected

Definition at line 62 of file Server.php.

◆ $_classmap

$_classmap
protected

Definition at line 73 of file Server.php.

◆ $_encoding

$_encoding
protected

Definition at line 79 of file Server.php.

◆ $_faultExceptions

$_faultExceptions = array()
protected

Definition at line 106 of file Server.php.

◆ $_features

$_features
protected

Definition at line 86 of file Server.php.

◆ $_functions

$_functions = array()
protected

Definition at line 113 of file Server.php.

◆ $_object

$_object
protected

Object registered with this server

Definition at line 67 of file Server.php.

◆ $_persistence

$_persistence
protected

Definition at line 119 of file Server.php.

◆ $_request

$_request
protected

Definition at line 125 of file Server.php.

◆ $_response

$_response
protected

Definition at line 131 of file Server.php.

◆ $_returnResponse

$_returnResponse = false
protected

Definition at line 138 of file Server.php.

◆ $_soapVersion

$_soapVersion = SOAP_1_2
protected

Definition at line 144 of file Server.php.

◆ $_uri

$_uri
protected

Definition at line 156 of file Server.php.

◆ $_wsdl

$_wsdl
protected

Definition at line 150 of file Server.php.

◆ $_wsdlCache

$_wsdlCache
protected

Definition at line 93 of file Server.php.

◆ $_wsiCompliant

$_wsiCompliant
protected

Definition at line 100 of file Server.php.


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