phpDoc и завершение кода через '->' T_OBJECT_OPERATOR в NetBeans 8.0

Каким образом завершение кода происходит с блоками phpDoc, загружаемыми с помощью T_OBJECT_OPERATOR без предварительной настройки переменных, как показано ниже, является источником?

Единственный класс, который имеет значение, – это parentExample поскольку он задает необходимый $cc , который предлагает рабочее решение, но нежелательно заранее задавать переменные таким образом.

В примере кода показано нежелательное решение и несколько нерабочих попыток.

Поскольку завершение кода основано на ранее заданной информации, предпочтительнее использовать полный сценарий примера, а не только фрагменты. Кроме того, поскольку он относится к phpDocumentor, также были включены базовые блоки phpDoc. Желательно, чтобы эти docBlocks загружались как часть завершения кода не только именованных объектов.

 <?php /** * This is a parent class. * * @package Examples/doubledVars */ class parentExample { /* @var $a parentExample */ public $a; /** * This is a var named b * @var $b parentExample */ public $b; public $c; public $cc; // notice^ <------------------------------------------------------SEE ME /** * A basic contructor */ public function __construct() { echo '::PE Class initiated::'; $this -> a = 'we are value "a" in the parent class'; $this -> b = 'we are value "b" in the parent class'; $this -> c = 'we are value "c" in the parent class'; } } /** * This is an Example of doubling occuring due to failed to __construct() * * @package Examples/doubledVars */ class doubledVars extends parentExample { /** * Value is obtained via parent constuctor. * * @return string assigned during construction of parent class. */ public function getA() { return $this -> a; } } /** * This is an Example of no doubling occuring due to __construct() * * @package Examples/doubledVars */ class noDouble extends parentExample { /** * an empty constructor used to prevent doubling during construction. * child class makes use of parent constructor unless it has it's own. * or none exsist. */ public function __construct() { } /** * Empty string return * * Shows an example of returning values set based on the constructor * class. In this case there is no default values set at any point, but * rather value is assigned during the construction of a object. * * @return string This string is empty */ public function getB() { return $this -> b; } } /** * This is an Example of no doubling occuring due to __construct() * @see noDouble * * @package Examples/codeCompletion */ class codeCompletion extends parentExample { /** * @see noDouble::__construct() */ public function __construct() { //empty constructor prevents doubling } public function getC() { return $this -> c; } } /** @var $parentExampleDV parentExample */ $parentExampleDV = new parentExample; // Tried this for Code completion, it did not work <------------------SEE ME /** @var $doubledVars doubledVars */ $parentExampleDV->doubledVars = new doubledVars; /* output on next 'echo' will be as follows */ //::PE Class initiated::::PE Class initiated::we are in the parent class echo '@@'.$parentExampleDV->doubledVars->getA().'@@';// NO CC <-------SEE ME echo '<br><br>----------<br><br>'; /** @var $parentExampleDV parentExample */ $parentExampleND = new parentExample; // Tried this for Code completion, it did not work <------------------SEE ME /** @var $parentExample->noDouble noDouble */ $parentExampleND -> noDouble = new noDouble; /* output on next 'echo' will be as follows */ //we are in the parent class echo '!!'.$parentExampleND->noDouble->getB().'!!';// NO CC <----------SEE ME echo '<br><br>----------<br><br>'; $parentExampleCC = new parentExample; $parentExampleCC->cc = new codeCompletion; echo '##'.$parentExampleCC->cc->getC().'##';//CC working <------------SEE ME echo '<br><br>----------<br><br>';