';
echo $html;
} else {
set_include_path(get_include_path().PATH_SEPARATOR.$path);
require_once $path . '/SabreAMF/CallbackServer.php';
$server = new SabreAMF_CallbackServer();
$server->onInvokeService = '_sabreamf_server_callback';
$server->exec();
}
}
function _sabreamf_server_callback($serviceName, $methodName, $arguments) {
$method = $serviceName.'.'.$methodName;
// this is only a convenience method so that you can test sabreamf drupal module
// using a php script (running from browser or from the console(ie: command line in windows))
// this "if" block bellow can be removed with no issue
if($methodName == 'sabreamf_pingme') {
return array($method, $arguments);
}
return sabreamf_method_call($method, array($method, $arguments));
}
/*
* Implementation of hook_method_call()
*/
function sabreamf_method_call($method_name, $args) {
return services_method_call($method_name, $args);
}
/*
* Implementation of hook_server_error()
*/
function sabreamf_server_error($message) {
watchdog('sabreamf server', $message, NULL, WATCHDOG_ERROR);
}
/*
function trace_dump_sabreamf() {
$args = func_get_args();
$fp = fopen(dirname(__FILE__).'/log.txt', 'a+');
fwrite($fp, print_r($args, true)."\n");
fclose($fp);
}
*/