Netbeans Autocomplete on Class Properties Using PHPDoc
May 12, 2010 · 1 minute readCategory: netbeans
This is post is now quite old and the the information it contains may be out of date or innacurate.
If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub
Here is the answer:
/**
* @property MyObject $myObject
* @property AnotherObject $anotherObject
*/
class MyClass{
protected $myObject;
protected $anotherObject;
public function __construct($myObject, $anotherObject){
$this->myObject=$myObject;
$this->anotherObject=$anotherObject;
}
public function autocomplete(){
$this->myObject->//autocomplete works here
}
}