|
@ -63,7 +63,7 @@ class RpcServer extends BaseService { |
|
|
$className = 'rpc\\controllers\\'.ucfirst($data['controller']).'Controller'; |
|
|
$className = 'rpc\\controllers\\'.ucfirst($data['controller']).'Controller'; |
|
|
if( class_exists($className) && method_exists($className,'action'.ucfirst($data['method'])) ) { |
|
|
if( class_exists($className) && method_exists($className,'action'.ucfirst($data['method'])) ) { |
|
|
$obj = new $className($data['controller'],Yii::$app); |
|
|
$obj = new $className($data['controller'],Yii::$app); |
|
|
return $obj->runAction($data['method'],$data['data']); |
|
|
|
|
|
|
|
|
return $obj->runAction($data['method'],['params'=>$data['params']]); |
|
|
}else |
|
|
}else |
|
|
throw new NotFoundRpcException('the rpc handler undefined or can not callout the method'); |
|
|
throw new NotFoundRpcException('the rpc handler undefined or can not callout the method'); |
|
|
}else |
|
|
}else |
|
|