classname = $class; parent::__construct($class,$method); $this->parseComment(); } /** * Returns the full function name, including arguments * @return string */ public function getFullName(){ $args = $this->getParameters(); $argstr = ""; foreach((array)$args as $arg){ if($argstr!="")$argstr.=", "; $argstr.= $arg->type ." $".$arg->name; } return $this->return." ".$this->name."(".$argstr.")"; } /** * Returns an array with parameter objects, containing type info etc. * * @return ReflectionParameter[] Associative array with parameter objects */ public function getParameters(){ $this->parameters = Array(); $ar = parent::getParameters(); $i = 0; foreach((array)$ar as $parameter){ $parameter->type = $this->params[$i++]->type; $this->parameters[$parameter->name] = $parameter; } return $this->parameters; } /** * * @param $annotationName String the annotation name * @param $annotationClass String the annotation class * @return void */ public function getAnnotation($annotationName, $annotationClass = null){ return IPPhpDoc::getAnnotation($this->comment, $annotationName, $annotationClass); } /** * Parses the comment and adds found properties to this class * @return void */ private function parseComment(){ $this->comment = $this->getDocComment(); new IPReflectionCommentParser($this->comment, $this); } } ?>