Home > Backend Development > PHP Tutorial > phpRPC远程调用,但是每个方法的参数个数不一致,不想写死,怎么搞?

phpRPC远程调用,但是每个方法的参数个数不一致,不想写死,怎么搞?

WBOY
Release: 2016-06-06 20:20:27
Original
1105 people have browsed it

远程调用如下类方法,但是每个方法的参数个数不一致,不想写死,怎么搞?

<code>class aaaController extends RpcController 
{
    public function one_function($a='', $b='', $c=''){}
    public function two_function($d='', $e=''){}
    public function three_function($f=''){}
}
</code>
Copy after login
Copy after login

请勿重复提问:http://segmentfault.com/q/1010000004290664

这个问题已被关闭,原因:与已有问题重复

回复内容:

远程调用如下类方法,但是每个方法的参数个数不一致,不想写死,怎么搞?

<code>class aaaController extends RpcController 
{
    public function one_function($a='', $b='', $c=''){}
    public function two_function($d='', $e=''){}
    public function three_function($f=''){}
}
</code>
Copy after login
Copy after login

请勿重复提问:http://segmentfault.com/q/1010000004290664

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template