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;
    }