classname = $classname; parent::__construct($classname); $this->parseComment(); } /** *Levert een array met alle methoden van deze class op * * @param boolean If the method should also return protected functions * @param boolean If the method should also return private functions * @return IPReflectionMethod[] */ public function getMethods($alsoProtected = true, $alsoPrivate = true){ $ar = parent::getMethods(); foreach($ar as $method){ $m = new IPReflectionMethod($this->classname, $method->name); if((!$m->isPrivate() || $alsoPrivate) && (!$m->isProtected() || $alsoProtected) && ($m->getDeclaringClass()->name == $this->classname)) $this->methods[$method->name] = $m; } ksort($this->methods); return $this->methods; } /** * Levert een array met variabelen van deze class op * * @param boolean If the method should also return protected properties * @param boolean If the method should also return private properties * @return IPReflectionProperty[] */ public function getProperties($alsoProtected=true,$alsoPrivate=true) { $ar = parent::getProperties(); $this->properties = Array(); foreach($ar as $property){ if((!$property->isPrivate() || $alsoPrivate) && (!$property->isProtected() || $alsoProtected)){ try{ $p = new IPReflectionProperty($this->classname, $property->getName()); $this->properties[$property->name]=$p; }catch(ReflectionException $exception){ echo "Fout bij property: ".$property->name."
\n"; } } } ksort($this->properties); return $this->properties; } /** * * @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); } /** * Gets all the usefull information from the comments * @return void */ private function parseComment() { $this->comment = $this->getDocComment(); new IPReflectionCommentParser($this->comment, $this); } } ?>