5

Perhaps I'm not understanding completely, but I'm trying to get the {@link} inline PHPDoc tag to link to another method in the class (the docblock in question is for a "shorthand alias" method)

I haven't actually generated anything to documentation, but the {@link} is showing as plain-text in the NetBeans method descriptor. Am I doing something wrong syntactically (if I compile the documentation will this work?) or just that NetBeans is unable to support the inline {@link}?

For example:

class MyClass
{

    /**
     * Shorthand alias for {@link MyClass::method()}
     *
     * @param mixed $foo
     * @param mixed $bar
     * @return mixed
     */
    public function __invoke($foo, $bar)
    {
        return $this->method($foo, $bar);
    }

    /**
     * Does stuff with $foo and $bar
     *
     * @param mixed $foo
     * @param mixed $bar
     * @return mixed
     */
    public function method($foo, $bar)
    {
        // ...
    }

}
1
  • Netbeans doesn't support all of PHP doc (yet!), it'll probably work. Commented Oct 7, 2011 at 20:58

1 Answer 1

4

Compile the documentation, it should work then, otherwise PHPDoc will spit out an error message telling you more.

Netbeans might not support all PHPDoc features, you can also try @see.

Sign up to request clarification or add additional context in comments.

2 Comments

Also see an issue for autocomplete here: netbeans.org/bugzilla/show_bug.cgi?id=200891
@Nux: Thanks for the cross-link, very valuable!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.