/** *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 alle methoden van deze class op. * * @param bool If the method should also return protected functions * @param bool If the method should also return private functions * * @return IPReflectionMethod[] */ public function getMethods($alsoProtected = true, $alsoPrivate = true, $alsoHerited = false) { $ar = parent::getMethods(); foreach ($ar as $method) { if (substr($method->name, 0, 2) == '__' || $method->isAbstract() || $method->isConstructor() || $method->isDestructor()) { continue; } $m = new IPReflectionMethod($this->classname, $method->name); if ((!$m->isPrivate() || $alsoPrivate) && (!$m->isProtected() || $alsoProtected) && ($m->getDeclaringClass()->name == $this->classname || $alsoHerited)) { $this->methods[$method->name] = $m; } } ksort($this->methods); return $this->methods; }