Moodle  2.2.1
http://www.collinsharper.com
Zend_Soap_Server Class Reference
Inheritance diagram for Zend_Soap_Server:
Collaboration diagram for Zend_Soap_Server:

Public Member Functions

 __construct ($wsdl=null, array $options=null)
 setOptions ($options)
 getOptions ()
 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
 $_faultExceptions = array()
 $_functions = array()
 $_persistence
 $_request
 $_response
 $_returnResponse = false
 $_soapVersion = SOAP_1_2
 $_wsdl
 $_uri

Detailed Description

Definition at line 38 of file Server.php.


Constructor & Destructor Documentation

__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 160 of file Server.php.

Here is the call graph for this function:


Member Function Documentation

_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 757 of file Server.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_initializeSoapErrorContext ( ) [protected]

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

Returns:
boolean display_errors original value

Definition at line 855 of file Server.php.

Here is the caller graph for this function:

_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 676 of file Server.php.

Here is the caller graph for this function:

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 503 of file Server.php.

Deregister a fault exception from the fault exception stack

Parameters:
string$class
Returns:
boolean

Definition at line 881 of file Server.php.

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|Exception $fault string $code SOAP Fault Codes SoapFault

Implements Zend_Server_Interface.

Reimplemented in moodle_zend_soap_server.

Definition at line 916 of file Server.php.

Here is the caller graph for this function:

getActor ( )

Retrieve actor

Returns:
string

Definition at line 359 of file Server.php.

Retrieve classmap

Returns:
mixed

Definition at line 425 of file Server.php.

Get encoding

Returns:
string

Definition at line 288 of file Server.php.

Return fault exceptions list

Returns:
array

Definition at line 897 of file Server.php.

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).

public

Returns:
array

Implements Zend_Server_Interface.

Definition at line 611 of file Server.php.

Retrieve request XML

Returns:
string

Definition at line 706 of file Server.php.

Get response XML

Returns:
string

Definition at line 743 of file Server.php.

Return array of options suitable for using with SoapServer constructor

Returns:
array

Definition at line 231 of file Server.php.

Here is the caller graph for this function:

Get server persistence

Returns:
Zend_Soap_Server

Definition at line 658 of file Server.php.

Retrieve return response flag

Returns:
boolean

Definition at line 733 of file Server.php.

Return current SOAP Features options

Returns:
int

Definition at line 469 of file Server.php.

Get SOAP version

Returns:
int

Definition at line 316 of file Server.php.

getUri ( )

Retrieve URI

Returns:
string

Definition at line 385 of file Server.php.

getWsdl ( )

Retrieve wsdl

Returns:
string

Definition at line 447 of file Server.php.

Get current SOAP Wsdl Caching option

Definition at line 489 of file Server.php.

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 802 of file Server.php.

Here is the call graph for this function:

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 955 of file Server.php.

Here is the call graph for this function:

loadFunctions ( definition)

Unimplemented: Load server definition

Parameters:
array$array
Returns:
void
Exceptions:
Zend_Soap_Server_ExceptionUnimplemented

Implements Zend_Server_Interface.

Definition at line 630 of file Server.php.

registerFaultException ( class)

Register a valid fault exception

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

Definition at line 869 of file Server.php.

setActor ( actor)

Set actor

Actor is the actor URI for the server.

Parameters:
string$actor
Returns:
Zend_Soap_Server

Definition at line 347 of file Server.php.

Here is the call graph for this function:

Here is the caller graph for this function:

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 549 of file Server.php.

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 397 of file Server.php.

Here is the caller graph for this function:

setEncoding ( encoding)

Set encoding

Parameters:
string$encoding
Returns:
Zend_Soap_Server
Exceptions:
Zend_Soap_Server_Exceptionwith invalid encoding argument

Definition at line 272 of file Server.php.

Here is the caller graph for this function:

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 584 of file Server.php.

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 184 of file Server.php.

Here is the call graph for this function:

Here is the caller graph for this function:

setPersistence ( mode)

Set server persistence

Parameters:
int$mode
Returns:
Zend_Soap_Server

Implements Zend_Server_Interface.

Definition at line 642 of file Server.php.

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 722 of file Server.php.

setSoapFeatures ( feature)

Set the SOAP Feature options.

Parameters:
string | int$feature
Returns:
Zend_Soap_Server

Definition at line 458 of file Server.php.

Here is the caller graph for this function:

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 300 of file Server.php.

Here is the caller graph for this function:

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 373 of file Server.php.

Here is the call graph for this function:

Here is the caller graph for this function:

setWsdl ( wsdl)

Set wsdl

Parameters:
string$wsdlURI or path to a WSDL
Returns:
Zend_Soap_Server

Definition at line 436 of file Server.php.

Here is the caller graph for this function:

setWsdlCache ( options)

Set the SOAP Wsdl Caching Options

Parameters:
string | int | boolean$caching
Returns:
Zend_Soap_Server

Definition at line 480 of file Server.php.

Here is the caller graph for this function:

validateUrn ( urn)

Check for valid URN

Parameters:
string$urn
Returns:
true
Exceptions:
Zend_Soap_Server_Exceptionon invalid URN

Definition at line 328 of file Server.php.

Here is the caller graph for this function:


Field Documentation

$_actor [protected]

Definition at line 44 of file Server.php.

$_class [protected]

Definition at line 50 of file Server.php.

$_classArgs = array() [protected]

Definition at line 56 of file Server.php.

$_classmap [protected]

Definition at line 67 of file Server.php.

$_encoding [protected]

Definition at line 73 of file Server.php.

$_faultExceptions = array() [protected]

Definition at line 94 of file Server.php.

$_features [protected]

Definition at line 80 of file Server.php.

$_functions = array() [protected]

Definition at line 101 of file Server.php.

$_object [protected]

Object registered with this server

Definition at line 61 of file Server.php.

$_persistence [protected]

Definition at line 107 of file Server.php.

$_request [protected]

Definition at line 113 of file Server.php.

$_response [protected]

Definition at line 119 of file Server.php.

$_returnResponse = false [protected]

Definition at line 126 of file Server.php.

$_soapVersion = SOAP_1_2 [protected]

Definition at line 132 of file Server.php.

$_uri [protected]

Definition at line 144 of file Server.php.

$_wsdl [protected]

Definition at line 138 of file Server.php.

$_wsdlCache [protected]

Definition at line 87 of file Server.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations