/** * Returns a method for a class by a given name * * @param text.doclet.ClassDoc self * @param string name * @return text.doclet.MethodDoc * @throws lang.ElementNotFoundException */ public static function methodNamed(ClassDoc $self, $name) { foreach ($self->methods as $method) { if ($name === $method->name()) { return $method; } } raise('lang.ElementNotFoundException', 'No such method ' . $name . ' in ' . $self->name()); }