/** * The default behaviour: get argument info from method parameters */ public function getArgInfoListByReflection() { $argInfo = new ArgInfoList(); $ro = new ReflectionObject($this); if (!method_exists($this, 'execute')) { throw new ExecuteMethodNotDefinedException($this); } $method = $ro->getMethod('execute'); $requiredNumber = $method->getNumberOfRequiredParameters(); $parameters = $method->getParameters(); foreach ($parameters as $param) { // TODO: add description to the argument $a = new ArgInfo($param->getName()); if ($param->isOptional()) { $a->optional(true); } $argInfo->append($a); } return $argInfo; }