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

Public Member Functions

 run ()
 exception_handler ($ex)

Protected Member Functions

 parse_request ()
 send_response ()
 send_error ($ex=null)
 session_cleanup ($exception=null)
 load_function_info ()
 execute ()

Protected Attributes

 $parameters = null
 $functionname = null
 $function = null
 $returns = null

Detailed Description

Web Service server base class, this class handles both simple and token authentication.

Author:
Petr Skoda (skodak)

Definition at line 1301 of file lib.php.


Member Function Documentation

exception_handler ( ex)

Specialised exception handler, we can not use the standard one because it can not just print html to output.

Parameters:
exception$ex
Returns:
void does not return

Definition at line 1388 of file lib.php.

Here is the call graph for this function:

execute ( ) [protected]

Execute previously loaded function using parameters parsed from the request data.

Returns:
void

Definition at line 1491 of file lib.php.

Here is the caller graph for this function:

load_function_info ( ) [protected]

Fetches the function description from database, verifies user is allowed to use this function and loads all paremeters and return descriptions.

Returns:
void

Definition at line 1421 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

parse_request ( ) [abstract, protected]

This method parses the request input, it needs to get: 1/ user authentication - username+password or token 2/ function name 3/ function parameters

Returns:
void

Reimplemented in webservice_rest_server.

Here is the caller graph for this function:

run ( )

Process request from client.

Returns:
void

Implements webservice_server_interface.

Definition at line 1342 of file lib.php.

Here is the call graph for this function:

send_error ( ex = null) [abstract, protected]

Send the error information to the WS client.

Parameters:
exception$ex
Returns:
void

Reimplemented in webservice_rest_server.

Here is the caller graph for this function:

send_response ( ) [abstract, protected]

Send the result of function call to the WS client.

Returns:
void

Reimplemented in webservice_rest_server.

Here is the caller graph for this function:

session_cleanup ( exception = null) [protected]

Future hook needed for emulated sessions.

Parameters:
exception$exceptionnull means normal termination, $exception received when WS call failed
Returns:
void

Definition at line 1407 of file lib.php.

Here is the caller graph for this function:


Field Documentation

$function = null [protected]

Definition at line 1310 of file lib.php.

$functionname = null [protected]

Definition at line 1307 of file lib.php.

$parameters = null [protected]

Definition at line 1304 of file lib.php.

$returns = null [protected]

Definition at line 1313 of file lib.php.


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