I would like to have access to the methods by ReflectionMethod:
$r = new ReflectionMethod($class, $method);
$params = $r->getParameters();
and if parameters are required ($Option), get source of that method to prepare the parameters:
public function GetFeedback($Options) {
$this->checkConnection();
return $this->_client->doGetFeedback(
$Options['feedback-from'],
$Options['feedback-to']
);
}
so in my example to find $Option keys – ‘feedback-from’ and ‘feedback-to’
Assuming a class like
this code will do what you ask for
Output:
However, the only valid usage for this approach IMO is to generate a docblock listing these options and agree that you are likely doing it wrong if you need this in production code.