コード例 #1
0
 /**
  * @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");
     }
 }
コード例 #2
0
 /**
  * Gets the type of the parameter.
  * 
  * @return Type
  */
 public function getType()
 {
     return $this->declaringFunction->__internal_getParameterType($this->getReflector());
 }
コード例 #3
0
 /**
  * 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);
 }