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

Public Member Functions

 __construct ()
 setEncoding ($encoding)
 getEncoding ()
 returnResponse ($flag=null)
 handle ($request=false)
 setClass ($classname, $namespace= '', $argv=array())
 fault ($exception=null, $code=null)
 getHeaders ()
 addFunction ($function, $namespace= '')
 getFunctions ()
 loadFunctions ($functions)
 setPersistence ($mode)

Static Public Member Functions

static lowerCase (&$value, &$key)

Protected Member Functions

 _handleStruct ($struct)
 _structValue ($struct, DOMDocument $dom, DOMElement $parent)
 _handleScalar ($value)
 _callStaticMethod ($class, array $args)
 _callObjectMethod ($class, array $args)

Protected Attributes

 $_args = array()
 $_encoding = 'UTF-8'
 $_functions = array()
 $_headers = array()
 $_method
 $_reflection = null
 $_returnResponse = false

Static Protected Attributes

static $magicMethods

Detailed Description

Definition at line 45 of file Server.php.


Constructor & Destructor Documentation

Constructor

Definition at line 105 of file Server.php.


Member Function Documentation

_callObjectMethod ( class,
array args 
) [protected]

Call an instance method of an object

Parameters:
string$class
array$args
Returns:
mixed
Exceptions:
Zend_Rest_Server_ExceptionFor invalid class name

Definition at line 592 of file Server.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_callStaticMethod ( class,
array args 
) [protected]

Call a static class method and return the result

Parameters:
string$class
array$args
Returns:
mixed

Definition at line 574 of file Server.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_handleScalar ( value) [protected]

Handle a single value

Parameters:
string | int | boolean$valueResult value
Returns:
string XML Response

Definition at line 391 of file Server.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_handleStruct ( struct) [protected]

Handle an array or object result

Parameters:
array | object$structResult Value
Returns:
string XML Response

Definition at line 312 of file Server.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_structValue ( struct,
DOMDocument $  dom,
DOMElement $  parent 
) [protected]

Recursively iterate through a struct

Recursively iterates through an associative array or object's properties to build XML response.

Parameters:
mixed$struct
DOMDocument$dom
DOMElement$parent
Returns:
void

Definition at line 358 of file Server.php.

Here is the caller graph for this function:

addFunction ( function,
namespace = '' 
)

Implement Zend_Server_Interface::addFunction()

Parameters:
string$functionFunction Name
string$namespaceFunction namespace (unused)

Implements Zend_Server_Interface.

Definition at line 521 of file Server.php.

fault ( exception = null,
code = null 
)

Implement Zend_Server_Interface::fault()

Creates XML error response, returning DOMDocument with response.

Parameters:
string | Exception$faultMessage
int$codeError Code
Returns:
DOMDocument

Implements Zend_Server_Interface.

Definition at line 443 of file Server.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Get XML encoding

Returns:
string

Definition at line 128 of file Server.php.

Here is the caller graph for this function:

Implement Zend_Server_Interface::getFunctions()

Returns:
array An array of Zend_Server_Reflection_Method's

Implements Zend_Server_Interface.

Definition at line 542 of file Server.php.

Retrieve any HTTP extra headers set by the server

Returns:
array

Definition at line 510 of file Server.php.

handle ( request = false)

Implement Zend_Server_Interface::handle()

Parameters:
array$request
Exceptions:
Zend_Rest_Server_Exception
Returns:
string|void

Implements Zend_Server_Interface.

Definition at line 176 of file Server.php.

Here is the call graph for this function:

loadFunctions ( functions)

Implement Zend_Server_Interface::loadFunctions()

Todo:
Implement
Parameters:
array$functions

Implements Zend_Server_Interface.

Definition at line 553 of file Server.php.

static lowerCase ( &$  value,
&$  key 
) [static]

Lowercase a string

Lowercase's a string by reference

Parameters:
string$value
string$key
Returns:
string Lower cased string

Definition at line 142 of file Server.php.

returnResponse ( flag = null)

Whether or not to return a response

If called without arguments, returns the value of the flag. If called with an argument, sets the flag.

When 'return response' is true, handle() will not send output, but will instead return the response from the dispatched function/method.

Parameters:
boolean$flag
Returns:
boolean|Zend_Rest_Server Returns Zend_Rest_Server when used to set the flag; returns boolean flag value otherwise.

Definition at line 159 of file Server.php.

Here is the caller graph for this function:

setClass ( classname,
namespace = '',
argv = array() 
)

Implement Zend_Server_Interface::setClass()

Parameters:
string$classnameClass name
string$namespaceClass namespace (unused)
array$argvAn array of Constructor Arguments

Implements Zend_Server_Interface.

Definition at line 298 of file Server.php.

setEncoding ( encoding)

Set XML encoding

Parameters:
string$encoding
Returns:
Zend_Rest_Server

Definition at line 117 of file Server.php.

setPersistence ( mode)

Implement Zend_Server_Interface::setPersistence()

Todo:
Implement
Parameters:
int$mode

Implements Zend_Server_Interface.

Definition at line 563 of file Server.php.


Field Documentation

$_args = array() [protected]

Definition at line 51 of file Server.php.

$_encoding = 'UTF-8' [protected]

Definition at line 56 of file Server.php.

$_functions = array() [protected]

Definition at line 61 of file Server.php.

$_headers = array() [protected]

Definition at line 66 of file Server.php.

$_method [protected]

Definition at line 89 of file Server.php.

$_reflection = null [protected]

Definition at line 94 of file Server.php.

$_returnResponse = false [protected]

Definition at line 100 of file Server.php.

$magicMethods [static, protected]
Initial value:
 array(
        '__construct',
        '__destruct',
        '__get',
        '__set',
        '__call',
        '__sleep',
        '__wakeup',
        '__isset',
        '__unset',
        '__tostring',
        '__clone',
        '__set_state',
    )

Definition at line 71 of file Server.php.


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