MDL-23726 fixed phpdocs - credit goes to Henning Bostelmann
[moodle.git] / mnet / rpclib.php
blob1438b24c6c193e2a33ce88998f26749969b531d7
1 <?php // $Id$
2 /**
3 * Some dummy functions to test XML-RPC with
4 */
6 /**
7 * The xxxx_RPC_OK must exist and return TRUE for the remote call to be
8 * permitted
10 * @return bool True if the related function can be executed remotely
12 function mnet_concatenate_strings_RPC_OK() {
13 return true;
16 function mnet_publishes() {
17 $servicelist = array();
18 $service['name'] = 'sso';
19 $function['name'] = 'mnet_concatenate_strings';
21 // first argument
22 $argument['type'] = 'string';
23 $argument['default'] = '';
24 $function['arguments'][] = $argument;
26 // second argument
27 $argument['type'] = 'string';
28 $argument['default'] = '';
29 $function['arguments'][] = $argument;
31 // third argument
32 $argument['type'] = 'string';
33 $argument['default'] = '';
34 $function['arguments'][] = $argument;
36 $function['description'] = get_string($function['name'], 'mnet');
37 $service['functions'][] = $function;
38 $servicelist[] = $service;
40 return $servicelist;
42 //header('Content-type: text/plain');
43 //var_dump(mnet_publishes());
45 /**
46 * Concatenate (up to) 3 strings and return the result
47 * @service sso
48 * @param string $string1 Some string
49 * @param string $string2 Some string
50 * @param string $string3 Some string
51 * @return string The parameter strings, concatenated together
53 function mnet_concatenate_strings($string1='', $string2='', $string3='') {
54 return $string1.$string2.$string3;
57 class testClass {
58 function testClass() {
59 $this->first = 'last';
60 $this->last = 'first';
63 function augment_first($newval) {
64 $this->first = $this->first.$newval;
65 return $this->first;
68 function augment_first_RPC_OK() {
69 return true;
72 function mnet_concatenate_strings_RPC_OK() {
73 return true;
75 function mnet_concatenate_strings($string1='', $string2='', $string3='') {
76 return $string1.$string2.$string3;