Fully Qualified Name: | Zend\Soap\Server |
Implements: | Server |
Name | Description | Defined By |
---|---|---|
__construct() | Constructor | Server |
addFunction() | Attach a function as a server method | Server |
deregisterFaultException() | Deregister a fault exception from the fault exception stack | Server |
fault() | Generate a server fault | Server |
getActor() | Retrieve actor | Server |
getClassmap() | Retrieve classmap | Server |
getEncoding() | Get encoding | Server |
getException() | Return caught exception during business code execution | Server |
getFaultExceptions() | Return fault exceptions list | Server |
getFunctions() | Return a server definition array | Server |
getLastRequest() | Retrieve request XML | Server |
getOptions() | Return array of options suitable for using with SoapServer constructor | Server |
getParseHuge() | Get flag to allow DOMDocument->loadXML() to parse huge nodes | Server |
getPersistence() | Get server persistence | Server |
getResponse() | Get response XML | Server |
getReturnResponse() | Retrieve return response flag | Server |
getSendErrors() | Get current SOAP send_errors option | Server |
getSoap() | Get SoapServer object | Server |
getSoapFeatures() | Return current SOAP Features options | Server |
getSoapVersion() | Get SOAP version | Server |
getTypemap() | Retrieve typemap | Server |
getUri() | Retrieve URI | Server |
getWSDL() | Retrieve wsdl | Server |
getWSDLCache() | Get current SOAP WSDL Caching option | Server |
handle() | Handle a request | Server |
handlePhpErrors() | Throw PHP errors as SoapFaults | Server |
isRegisteredAsFaultException() | Checks if provided fault name is registered as valid in this server. | Server |
loadFunctions() | Unimplemented: Load server definition | Server |
registerFaultException() | Validate and register fault exception | Server |
setActor() | Set actor | Server |
setClass() | Attach a class to a server | Server |
setClassmap() | Set classmap | Server |
setDebugMode() | Set the debug mode. | Server |
setEncoding() | Set encoding | Server |
setObject() | Attach an object to a server | Server |
setOptions() | Set Options | Server |
setParseHuge() | Set flag to allow DOMDocument->loadXML() to parse huge nodes | Server |
setPersistence() | Set server persistence | Server |
setReturnResponse() | Set return response flag | Server |
setSendErrors() | Set the SOAP send_errors Option | Server |
setSoapFeatures() | Set the SOAP Feature options. | Server |
setSoapVersion() | Set SOAP version | Server |
setTypemap() | Set typemap with xml to php type mappings with appropriate validation. | Server |
setUri() | Set URI | Server |
setWSDL() | Set wsdl | Server |
setWSDLCache() | Set the SOAP WSDL Caching Options | Server |
validateUrn() | Check for valid URN | Server |
Constructor
Sets display_errors INI setting to off (prevent client errors due to bad XML in response). Registers {@link handlePhpErrors()} as error handler for E_USER_ERROR.
If $wsdl is provided, it is passed on to {@link setWSDL()}; if any options are specified, they are passed on to {@link setOptions()}.
Parameter Name | Type | Description |
---|---|---|
$wsdl | string | |
$options | array |
Returns:
Attach a function as a server method
Parameter Name | Type | Description |
---|---|---|
$function | array|string | Function |
$namespace | string | Ignored |
Returns: self
Deregister a fault exception from the fault exception stack
Parameter Name | Type | Description |
---|---|---|
$class | string |
Returns: bool
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()}.
Parameter Name | Type | Description |
---|---|---|
$fault | string|\Exception | |
$code | string | SOAP |
Returns: \SoapFault
Retrieve actor
Returns: string
Retrieve classmap
Returns: mixed
Get encoding
Returns: string
Return caught exception during business code execution
Returns: null|\Exception caught exception
Return fault exceptions list
Returns: array
Return a server definition array
Returns a list of all functions registered with {@link addFunction()}, merged with all public methods of the class set with {@link setClass()} (if any).
Returns: array
Retrieve request XML
Returns: string
Return array of options suitable for using with SoapServer constructor
Returns: array
Get flag to allow DOMDocument->loadXML() to parse huge nodes
Returns: bool
Get server persistence
Returns: int
Get response XML
Returns: string
Retrieve return response flag
Returns: bool
Get current SOAP send_errors option
Returns: bool
Get SoapServer object
Uses {@link $wsdl} and return value of {@link getOptions()} to instantiate SoapServer object, and then registers any functions or class with it, as well as persistence.
Returns: \SoapServer
Return current SOAP Features options
Returns: int
Get SOAP version
Returns: int
Retrieve typemap
Returns: array
Retrieve URI
Returns: string
Retrieve wsdl
Returns: string
Get current SOAP WSDL Caching option
Returns:
Handle a request
Instantiates SoapServer object with options set in object, and dispatches its handle() method.
$request may be any of:
If no request is passed, pulls request using php:://input (for cross-platform compatibility purposes).
Parameter Name | Type | Description |
---|---|---|
$request | \DOMDocument|\DOMNode|\SimpleXMLElement|\stdClass|string | Optional |
Returns: void|string
Throw PHP errors as SoapFaults
Parameter Name | Type | Description |
---|---|---|
$errno | int | |
$errstr | string |
Returns:
Checks if provided fault name is registered as valid in this server.
Parameter Name | Type | Description |
---|---|---|
$fault | string | Name |
Returns: bool
Unimplemented: Load server definition
Parameter Name | Type | Description |
---|---|---|
$definition | array |
Returns:
Validate and register fault exception
Parameter Name | Type | Description |
---|---|---|
$class | string|array | Exception |
Returns: self
Set actor
Actor is the actor URI for the server.
Parameter Name | Type | Description |
---|---|---|
$actor | string |
Returns: self
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 {@link setObject()} to set pre-configured object instances as request handlers.
Parameter Name | Type | Description |
---|---|---|
$class | string|object | Class |
$namespace | string | |
$argv | null|array |
Returns: self
Set classmap
Parameter Name | Type | Description |
---|---|---|
$classmap | array |
Returns: self
Set the debug mode.
In debug mode, all exceptions are send to the client.
Parameter Name | Type | Description |
---|---|---|
$debug | bool |
Returns: self
Set encoding
Parameter Name | Type | Description |
---|---|---|
$encoding | string |
Returns: self
Attach an object to a server
Accepts an instantiated object to use when handling requests.
Parameter Name | Type | Description |
---|---|---|
$object | object |
Returns: self
Set Options
Allows setting options as an associative array of option => value pairs.
Parameter Name | Type | Description |
---|---|---|
$options | array|\Traversable |
Returns: self
Set flag to allow DOMDocument->loadXML() to parse huge nodes
Parameter Name | Type | Description |
---|---|---|
$parseHuge | bool |
Returns: self
Set server persistence
Parameter Name | Type | Description |
---|---|---|
$mode | int | SOAP_PERSISTENCE_SESSION |
Returns: self
Set return response flag
If true, {@link handle()} will return the response instead of automatically sending it back to the requesting client.
The response is always available via {@link getResponse()}.
Parameter Name | Type | Description |
---|---|---|
$flag | bool |
Returns: self
Set the SOAP send_errors Option
Parameter Name | Type | Description |
---|---|---|
$sendErrors | bool |
Returns: self
Set the SOAP Feature options.
Parameter Name | Type | Description |
---|---|---|
$feature | string|int |
Returns: self
Set SOAP version
Parameter Name | Type | Description |
---|---|---|
$version | int | One |
Returns: self
Set typemap with xml to php type mappings with appropriate validation.
Parameter Name | Type | Description |
---|---|---|
$typeMap | array |
Returns: self
Set URI
URI in SoapServer is actually the target namespace, not a URI; $uri must begin with 'urn:'.
Parameter Name | Type | Description |
---|---|---|
$uri | string |
Returns: self
Set wsdl
Parameter Name | Type | Description |
---|---|---|
$wsdl | string | URI |
Returns: self
Set the SOAP WSDL Caching Options
Parameter Name | Type | Description |
---|---|---|
$options | string|int|bool |
Returns: self
Check for valid URN
Parameter Name | Type | Description |
---|---|---|
$urn | string |
Returns: bool