jsonrpc icon indicating copy to clipboard operation
jsonrpc copied to clipboard

variadic params for method

Open zoryamba-work opened this issue 5 years ago • 2 comments

If we have a lot of parameters and want to validate them via some framework validators, it could be useful to let users to pass params to method as a variadic param. e.g.

public function methodName(...$params)
{
    // some validations here
}

zoryamba-work avatar Apr 21 '19 08:04 zoryamba-work

It could be checked with ReflectionParameter::isVariadic method.

I could implement it and create a PR. Please, let me know, if this repo is still alive

zoryamba-work avatar Apr 21 '19 08:04 zoryamba-work

Sure it is still alive, but hasn't had much love for a bit. A PR would be great - thanks

johnstevenson avatar Apr 24 '19 14:04 johnstevenson