Zend_Server_Interface

category Zend
package Zend_Server
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
version $Id$

 Methods

Attach a function as a server method

addFunction(string $function, string $namespace = '') : void

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

Parameters

$function

string

$namespace

string

Generate a server fault

fault(mixed $fault = null, integer $code = 404) : mixed

Parameters

$fault

mixed

$code

integer

Returns

mixed

Return a server definition array

getFunctions() : array

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

access public

Returns

array

Handle a request

handle(mixed $request = false) : mixed

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

$request

mixed

Returns

mixed

Load server definition

loadFunctions($definition) : void

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

Parameters

$definition

Attach a class to a server

setClass(mixed $class, string $namespace = '', $argv = null) : void

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

$class

mixed

Class name or object instance to examine and attach to the server.

$namespace

string

Optional namespace with which to prepend method names in the dispatch table. methods in the class will be valid callbacks.

$argv

Set server persistence

setPersistence(integer $mode) : void
todo Determine how to implement this

Parameters

$mode

integer