2
在Netbeans和phpStorm, 此按預期工作:
public function someMethod() {
$objectA = uberEnterprisyFactory('someclassA');
/* @var $objectA TheClassA */
// $objectA-> (autocomplete for TheClassA is displayed, good)
這不:
public function someMethod() {
$this->objectA = uberEnterprisyFactory('somemodelA');
/* @var $this->objectA TheClassA */
// $this->objectA-> (no autocomplete here, not good, $this->objectA is inferred to be null)
我怎麼能sugest的$this->someThing
類型的Netbeans和/或phpStorm?
是 '對象A' 一個神奇的財產? – 2012-01-06 07:33:57
@Nikolay Matveev沒有魔法,簡單的「private $ objectA;」在課堂上定義。 – frnhr 2012-01-07 12:48:58