first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

NetBeans for PHP: “Defining a variable type in comment”; Petr Pisl

The comment has to be /* @var $variable type */ . If the comment is written in the right form, then the var tag has bold font.

You can use this helper, when NetBeans is not able to recognize the type of the variable. On the picture below you can see that NetBeans recognizes that the variable $media in the echo statement is Book type. But then another object is assigned to the $media variable through the getLastMovie() function. This function defines the return type Movie, so from this line NetBeans knows that $media variable contains an object of Movie type.

[http://blogs.sun.com/netbeansphp/entry/defining_variable_type_in_a]

mod date: 2009-08-17T23:55:44.000Z