我有返回服务描述对象的代码,JSON-RPC
然后我有类似的问题:PHP:获取函数所需的参数数量,但我有一个方法而不是函数。
function service_description($object) {
$class = get_class($object);
$methods = get_class_methods($class);
$service = array("sdversion" => "1.0",
"name" => "DemoService",
"address" => $_SERVER['PHP_SELF'],
"id" => "urn:md5:" . md5($_SERVER['PHP_SELF']));
foreach ($methods as $method) {
$service['procs'][] = array(
"name" => $method,
"params" => ?????
);
}
return $service;
}
如何检查每种方法的参数?