Zend Framework  1.12
Public Member Functions | List of all members
Zend_Server_Interface Interface Reference

Public Member Functions

 addFunction ($function, $namespace= '')
 Attach a function as a server method.
 
 setClass ($class, $namespace= '', $argv=null)
 Attach a class to a server.
 
 fault ($fault=null, $code=404)
 Generate a server fault.
 
 handle ($request=false)
 Handle a request.
 
 getFunctions ()
 Return a server definition array.
 
 loadFunctions ($definition)
 Load server definition.
 
 setPersistence ($mode)
 Set server persistence.
 

Member Function Documentation

addFunction (   $function,
  $namespace = '' 
)

Attach a function as a server method.

Namespacing is primarily for xmlrpc, but may be used with other implementations to prevent naming collisions.

Parameters
string$function
string$namespace
null|arrayOptional array of arguments to pass to callbacks at dispatch.
Returns
void

Implemented in Zend_Amf_Server, Zend_Soap_Server, Zend_Rest_Server, Zend_Soap_AutoDiscover, Zend_XmlRpc_Server, and Zend_Json_Server.

fault (   $fault = null,
  $code = 404 
)

Generate a server fault.

Parameters
mixed$fault
int$code
Returns
mixed

Implemented in Zend_Soap_Server, Zend_Amf_Server, Zend_Soap_AutoDiscover, Zend_Rest_Server, and Zend_XmlRpc_Server.

getFunctions ( )

Return a server definition array.

Returns a server definition array as created using Zend_Server_Reflection. Can be used for server introspection, documentation, or persistence.

public

Returns
array

Implemented in Zend_Amf_Server, Zend_Soap_Server, Zend_Soap_AutoDiscover, Zend_Rest_Server, Zend_XmlRpc_Server, and Zend_Server_Abstract.

handle (   $request = false)

Handle a request.

Requests may be passed in, or the server may automagically determine the request based on defaults. Dispatches server request to appropriate method and returns a response

Parameters
mixed$request
Returns
mixed

Implemented in Zend_Soap_Server, Zend_Amf_Server, Zend_Soap_AutoDiscover, Zend_XmlRpc_Server, Zend_Json_Server, and Zend_Rest_Server.

loadFunctions (   $definition)

Load server definition.

Used for persistence; loads a construct as returned by getFunctions().

Parameters
array$array
Returns
void

Implemented in Zend_Amf_Server, Zend_Soap_Server, Zend_Soap_AutoDiscover, Zend_Rest_Server, Zend_XmlRpc_Server, and Zend_Json_Server.

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

Attach a class to a server.

The individual implementations should probably allow passing a variable number of arguments in, so that developers may define custom runtime arguments to pass to server methods.

Namespacing is primarily for xmlrpc, but could be used for other implementations as well.

Parameters
mixed$classClass name or object instance to examine and attach to the server.
string$namespaceOptional namespace with which to prepend method names in the dispatch table. methods in the class will be valid callbacks.
null|arrayOptional array of arguments to pass to callbacks at dispatch.
Returns
void

Implemented in Zend_Amf_Server, Zend_Soap_Server, Zend_Soap_AutoDiscover, Zend_Rest_Server, Zend_XmlRpc_Server, and Zend_Json_Server.

setPersistence (   $mode)

Set server persistence.

Todo:
Determine how to implement this
Parameters
int$mode
Returns
void

Implemented in Zend_Amf_Server, Zend_Soap_Server, Zend_Soap_AutoDiscover, Zend_Rest_Server, Zend_XmlRpc_Server, and Zend_Json_Server.