public static $stringecho_sig = array(array('string', 'string'));
public static $stringecho_doc = 'Accepts a string parameter, returns the string.';
- function stringEcho($req)
+ public static function stringEcho($req)
{
// just sends back a string
return new Response(new Value($req->getParam(0)->scalarval()));
public static $echoback_sig = array(array('string', 'string'));
public static $echoback_doc = 'Accepts a string parameter, returns the entire incoming payload';
- function echoBack($req)
+ public static function echoBack($req)
{
// just sends back a string with what I got sent to me, that's all (escaping for xml is automatic)
$s = "I got the following message:\n" . $req->serialize();
public static $echosixtyfour_sig = array(array('string', 'base64'));
public static $echosixtyfour_doc = 'Accepts a base64 parameter and returns it decoded as a string';
- function echoSixtyFour($req)
+ public static function echoSixtyFour($req)
{
// Accepts an encoded value, but sends it back as a normal string.
// This is to test that base64 encoding is working as expected
public static $bitflipper_sig = array(array('array', 'array'));
public static $bitflipper_doc = 'Accepts an array of booleans, and returns them inverted';
- function bitFlipper($req)
+ public static function bitFlipper($req)
{
$v = $req->getParam(0);
$rv = new Value(array(), Value::$xmlrpcArray);
*
* To use this, use something akin to:
* $signatures = include('tests.php');
+ * NB: requires 'functions.php' to be included first
*
* Methods used by the phpxmlrpc testsuite
*/
// Greek word 'kosme'. NB: NOT a valid ISO8859 string!
// NB: we can only register this when setting internal encoding to UTF-8, or it will break system.listMethods
"tests.utf8methodname." . 'κόσμε' => array(
- "function" => "\\exampleMethods::stringEcho",
+ "function" => "exampleMethods::stringEcho",
"signature" => exampleMethods::$stringecho_sig,
"docstring" => exampleMethods::$stringecho_doc,
),
$signatures = array_merge($signatures1, $signatures2, $signatures3);
-if (defined('TESTMODE') || true) {
+if (defined('TESTMODE')) {
// Webservices used only by the testsuite - do not use them in production
$signatures4 = include(__DIR__.'/methodProviders/testsuite.php');
$signatures5 = include(__DIR__.'/methodProviders/wrapper.php');