You are not logged in.
Just found this out today and figured I'd share. When you want to use type hinting for variables in procedural code, type vdoc and hit tab and fill in the template for the variable you want. The variable defined in the comment will now be picked up via intellisense. This is really useful for functions and methods that return an unknown object type (like a service locator).
Ex:
Typing vdoc and hitting tab will generate the following:
[code=php]
/* @var $variable type */
[/code]
Replacing type with whichever class the object is of will allow netbeans to pick it up.
Ex when using something like a service locator:
[code=php]
$userManagementService = ServiceLocator::locate('User_Management_Service');
/* @var $userManagementService User_Management_Service */
[/code]
Using the template enables netbeans to provide intellisense for User_Management_Service even though the return type of locate is not clearly defined.
Offline