<?
/**
* This is a proxy class for the real class Test; a
* proxy object will communicate with the real object
* via XML-RPC
*/
class Test {
/**
* Get the constructor parameters and use them to construct
* the URL.
*/
function Test() {
$this->host = XCS_HOST;
$this->uri = XCS_URI;
$j = 0;
$i = func_num_args();
while($j < $i) {
$this->params .= func_get_arg($j) . '/';
$j++;
}
}
/**
* Call the real method using XML-RPC
*/
function sayHello($name) {
return xu_rpc_http_concise(
array(method => "sayhello",
args => $name,
host => $this->host,
uri => $this->uri . '/' . get_class($this) . '/' . $this->params));
}
var $host;
var $uri;
var $params;
}
?>
|