/** * @param ReflectionFunctionAbstract $function * @return AbstractFunctionInfo */ public static function create(ReflectionFunctionAbstract $function) { if ($function instanceof ReflectionMethod) { return MethodInfo::create($function); } else { throw new RuntimeException("reflector is not supported"); } }
/** * Gets the type of the parameter. * * @return Type */ public function getType() { return $this->declaringFunction->__internal_getParameterType($this->getReflector()); }
/** * Gets as method by its name. * * @param string $name * @return MethodInfo * @throws ReflectionException A reflection exception will be thrown, if the method does not exist. */ public function getMethod($name) { $m = $this->getReflectionClass()->getMethod($name); return MethodInfo::__internal_create($this, $m); }