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

Public Member Functions

 __construct ($authmethod)

Static Public Member Functions

static validate_and_cast_values ($description, $value)

Protected Member Functions

 init_service_class ()
 service_class_method_body ($function, $params)
 init_zend_server ()

Detailed Description

AMF service server implementation.

Author:
Petr Skoda (skodak)

Definition at line 47 of file locallib.php.


Constructor & Destructor Documentation

__construct ( authmethod)

Contructor

Parameters:
integer$authmethodauthentication method - one of WEBSERVICE_AUTHMETHOD_*

Reimplemented from webservice_server.

Definition at line 52 of file locallib.php.


Member Function Documentation

init_service_class ( ) [protected]

Load virtual class needed for Zend api

Returns:
void

Reimplemented from webservice_zend_server.

Definition at line 56 of file locallib.php.

init_zend_server ( ) [protected]

Set up zend service class

Returns:
void

Reimplemented from webservice_zend_server.

Definition at line 154 of file locallib.php.

service_class_method_body ( function,
params 
) [protected]

You can override this function in your child class to add extra code into the dynamically created service class. For example it is used in the amf server to cast types of parameters and to cast the return value to the types as specified in the return value description.

Parameters:
stdClass$function
array$params
Returns:
string body of the method for $function ie. everything within the {} of the method declaration.

Reimplemented from webservice_zend_server.

Definition at line 63 of file locallib.php.

static validate_and_cast_values ( description,
value 
) [static]

Validates submitted value, comparing it to a description. If anything is incorrect invalid_return_value_exception is thrown. Also casts the values to the type specified in the description.

Parameters:
mixed$descriptiondescription of parameters or null if no return value
mixed$valuethe actual values
boolean$singleasobjectspecifies whether a external_single_structure should be cast to a stdClass object should always be false for use in validating parameters in externallib functions.
Returns:
mixed params with added defaults for optional items, invalid_parameters_exception thrown if any problem found

Definition at line 92 of file locallib.php.

Here is the call graph for this function:


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