[ Index ]

PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008]

title

Body

[close]

/mnet/ -> rpclib.php (source)

   1  <?php // $Id: rpclib.php,v 1.2 2007/08/29 10:48:47 stronk7 Exp $
   2  /**
   3   * Some dummy functions to test XML-RPC with
   4   */
   5  
   6  /**
   7   * The xxxx_RPC_OK must exist and return TRUE for the remote call to be
   8   * permitted
   9   *
  10   * @return bool True if the related function can be executed remotely
  11   */
  12  function mnet_concatenate_strings_RPC_OK() {
  13      return true;
  14  }
  15  
  16  function mnet_publishes() {
  17      $servicelist = array();
  18          $service['name']             = 'sso';
  19              $function['name']        = 'mnet_concatenate_strings';
  20  
  21                  // first argument
  22                  $argument['type']    = 'string';
  23                  $argument['default'] = '';
  24              $function['arguments'][] = $argument;
  25  
  26                  // second argument
  27                  $argument['type']    = 'string';
  28                  $argument['default'] = '';
  29              $function['arguments'][] = $argument;
  30  
  31                  // third argument
  32                  $argument['type']    = 'string';
  33                  $argument['default'] = '';
  34              $function['arguments'][] = $argument;
  35          
  36              $function['description'] = get_string($function['name'], 'mnet');
  37          $service['functions'][]      = $function;
  38      $servicelist[]                   = $service;
  39  
  40      return $servicelist;
  41  }
  42  //header('Content-type: text/plain');
  43  //var_dump(mnet_publishes());
  44  
  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
  52   */
  53  function mnet_concatenate_strings($string1='', $string2='', $string3='') {
  54      return $string1.$string2.$string3;
  55  }
  56  
  57  class testClass {
  58      function testClass() {
  59          $this->first = 'last';
  60          $this->last  = 'first';
  61      }
  62      
  63      function augment_first($newval) {
  64          $this->first = $this->first.$newval;
  65          return $this->first;
  66      }
  67      
  68      function augment_first_RPC_OK() {
  69          return true;
  70      }
  71      
  72      function mnet_concatenate_strings_RPC_OK() {
  73          return true;
  74      }
  75      function mnet_concatenate_strings($string1='', $string2='', $string3='') {
  76          return $string1.$string2.$string3;
  77      }
  78  }
  79  
  80  ?>


Generated: Wed Jan 14 11:33:29 2009 Cross-referenced by PHPXref 0.7