Zend Framework
3.0
|
Public Member Functions | |
__construct ($wsdl=null, array $options=null) | |
Constructor. | |
setOptions ($options) | |
Set Options. | |
getOptions () | |
Return array of options suitable for using with SoapServer constructor. | |
setEncoding ($encoding) | |
Set encoding. | |
getEncoding () | |
Get encoding. | |
setSoapVersion ($version) | |
Set SOAP version. | |
getSoapVersion () | |
Get SOAP version. | |
validateUrn ($urn) | |
Check for valid URN. | |
setActor ($actor) | |
Set actor. | |
getActor () | |
Retrieve actor. | |
setUri ($uri) | |
Set URI. | |
getUri () | |
Retrieve URI. | |
setClassmap ($classmap) | |
Set classmap. | |
getClassmap () | |
Retrieve classmap. | |
setTypemap ($typeMap) | |
Set typemap with xml to php type mappings with appropriate validation. | |
getTypemap () | |
Retrieve typemap. | |
setWSDL ($wsdl) | |
Set wsdl. | |
getWSDL () | |
Retrieve wsdl. | |
setSoapFeatures ($feature) | |
Set the SOAP Feature options. | |
getSoapFeatures () | |
Return current SOAP Features options. | |
setWSDLCache ($options) | |
Set the SOAP WSDL Caching Options. | |
getWSDLCache () | |
Get current SOAP WSDL Caching option. | |
setSendErrors ($sendErrors) | |
Set the SOAP send_errors Option. | |
getSendErrors () | |
Get current SOAP send_errors option. | |
addFunction ($function, $namespace= '') | |
Attach a function as a server method. | |
setClass ($class, $namespace= '', $argv=null) | |
Attach a class to a server. | |
setObject ($object) | |
Attach an object to a server. | |
getFunctions () | |
Return a server definition array. | |
loadFunctions ($definition) | |
Unimplemented: Load server definition. | |
setPersistence ($mode) | |
Set server persistence. | |
getPersistence () | |
Get server persistence. | |
getLastRequest () | |
Retrieve request XML. | |
setReturnResponse ($flag=true) | |
Set return response flag. | |
getReturnResponse () | |
Retrieve return response flag. | |
getResponse () | |
Get response XML. | |
getSoap () | |
Get SoapServer object. | |
handle ($request=null) | |
Proxy for _getSoap method. | |
setDebugMode ($debug) | |
Set the debug mode. | |
registerFaultException ($class) | |
Validate and register fault exception. | |
isRegisteredAsFaultException ($fault) | |
Checks if provided fault name is registered as valid in this server. | |
deregisterFaultException ($class) | |
Deregister a fault exception from the fault exception stack. | |
getFaultExceptions () | |
Return fault exceptions list. | |
getException () | |
Return caught exception during business code execution. | |
fault ($fault=null, $code= 'Receiver') | |
Generate a server fault. | |
handlePhpErrors ($errno, $errstr, $errfile=null, $errline=null, array $errcontext=null) | |
Throw PHP errors as SoapFaults. | |
Protected Member Functions | |
setRequest ($request) | |
Set request. | |
initializeSoapErrorContext () | |
Method initializes the error context that the SOAPServer environment will run in. | |
Protected Attributes | |
$actor | |
$class | |
$server = null | |
$classArgs = [] | |
$classmap | |
$encoding | |
$faultExceptions = [] | |
$caughtException = null | |
$features | |
$functions = [] | |
$object | |
Object registered with this server. | |
$debug = false | |
$persistence | |
$request | |
$response | |
$returnResponse = false | |
$soapVersion = SOAP_1_2 | |
$typemap | |
$uri | |
$wsdl | |
$wsdlCache | |
$sendErrors | |
__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().
string | $wsdl | |
array | $options |
Exception\ExtensionNotLoadedException |
addFunction | ( | $function, | |
$namespace = '' |
|||
) |
Attach a function as a server method.
array | string | $function | Function name, array of function names to attach, or SOAP_FUNCTIONS_ALL to attach all functions |
string | $namespace | Ignored |
Exception\InvalidArgumentException | on invalid functions |
Implements Server.
deregisterFaultException | ( | $class | ) |
Deregister a fault exception from the fault exception stack.
string | $class |
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 { registerFaultException()}.
string| $fault string $code SOAP Fault Codes SoapFault
Implements Server.
getActor | ( | ) |
Retrieve actor.
getClassmap | ( | ) |
Retrieve classmap.
getEncoding | ( | ) |
Get encoding.
getException | ( | ) |
Return caught exception during business code execution.
getFaultExceptions | ( | ) |
Return fault exceptions list.
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).
Implements Server.
getLastRequest | ( | ) |
Retrieve request XML.
getOptions | ( | ) |
Return array of options suitable for using with SoapServer constructor.
getPersistence | ( | ) |
Get server persistence.
getResponse | ( | ) |
getReturnResponse | ( | ) |
getSendErrors | ( | ) |
Get current SOAP send_errors option.
getSoap | ( | ) |
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 persistence.
getSoapFeatures | ( | ) |
Return current SOAP Features options.
getSoapVersion | ( | ) |
Get SOAP version.
getTypemap | ( | ) |
Retrieve typemap.
getUri | ( | ) |
Retrieve URI.
getWSDL | ( | ) |
Retrieve wsdl.
getWSDLCache | ( | ) |
Get current SOAP WSDL Caching option.
handle | ( | $request = null | ) |
Proxy for _getSoap method.
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).
DOMDocument | DOMNode | SimpleXMLElement | \stdClass | string | $request | Optional request |
Implements Server.
handlePhpErrors | ( | $errno, | |
$errstr, | |||
$errfile = null , |
|||
$errline = null , |
|||
array | $errcontext = null |
||
) |
Throw PHP errors as SoapFaults.
int | $errno | |
string | $errstr | |
string | $errfile | |
int | $errline | |
array | $errcontext |
SoapFault |
|
protected |
Method initializes the error context that the SOAPServer environment will run in.
isRegisteredAsFaultException | ( | $fault | ) |
Checks if provided fault name is registered as valid in this server.
string | $fault | Name of a fault class |
loadFunctions | ( | $definition | ) |
Unimplemented: Load server definition.
array | $definition |
Exception\RuntimeException | Unimplemented |
Implements Server.
registerFaultException | ( | $class | ) |
Validate and register fault exception.
string | array | $class | Exception class or array of exception classes |
Exception\InvalidArgumentException |
setActor | ( | $actor | ) |
Set actor.
Actor is the actor URI for the server.
string | $actor |
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 pre-configured object instances as request handlers.
string | object | $class | Class name or object instance which executes SOAP Requests at endpoint. |
string | $namespace | |
null | array | $argv |
Exception\InvalidArgumentException | if called more than once, or if class does not exist |
Implements Server.
setClassmap | ( | $classmap | ) |
Set classmap.
array | $classmap |
Exception\InvalidArgumentException | for any invalid class in the class map |
setDebugMode | ( | $debug | ) |
Set the debug mode.
In debug mode, all exceptions are send to the client.
bool | $debug |
setEncoding | ( | $encoding | ) |
Set encoding.
string | $encoding |
Exception\InvalidArgumentException | with invalid encoding argument |
setObject | ( | $object | ) |
Attach an object to a server.
Accepts an instantiated object to use when handling requests.
object | $object |
Exception\InvalidArgumentException |
setOptions | ( | $options | ) |
Set Options.
Allows setting options as an associative array of option => value pairs.
array | \Traversable | $options |
setPersistence | ( | $mode | ) |
Set server persistence.
int | $mode | SOAP_PERSISTENCE_SESSION or SOAP_PERSISTENCE_REQUEST constants |
Exception\InvalidArgumentException |
Implements Server.
|
protected |
Set request.
$request may be any of:
DOMDocument | DOMNode | SimpleXMLElement | \stdClass | string | $request |
Exception\InvalidArgumentException |
setReturnResponse | ( | $flag = true | ) |
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().
bool | $flag |
Implements Server.
setSendErrors | ( | $sendErrors | ) |
Set the SOAP send_errors Option.
bool | $sendErrors |
setSoapFeatures | ( | $feature | ) |
Set the SOAP Feature options.
string | int | $feature |
setSoapVersion | ( | $version | ) |
Set SOAP version.
int | $version | One of the SOAP_1_1 or SOAP_1_2 constants |
Exception\InvalidArgumentException | with invalid soap version argument |
setTypemap | ( | $typeMap | ) |
Set typemap with xml to php type mappings with appropriate validation.
array | $typeMap |
Exception\InvalidArgumentException |
setUri | ( | $uri | ) |
Set URI.
URI in SoapServer is actually the target namespace, not a URI; $uri must begin with 'urn:'.
string | $uri |
setWSDL | ( | $wsdl | ) |
Set wsdl.
string | $wsdl | URI or path to a WSDL |
setWSDLCache | ( | $options | ) |
Set the SOAP WSDL Caching Options.
string | int | bool | $options |
validateUrn | ( | $urn | ) |
Check for valid URN.
string | $urn |
Exception\InvalidArgumentException | on invalid URN |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Object registered with this server.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |