A lot of new PHP scripts are using "return $this" at the end of methods to simplify coding. It would be grand if PhpED could recognize that "return $this" returns an object of the current class (or at least a child of).
In this example, the first call to setData() shows up in auto-complete, while the second call does not:
class Lp_LpAutopromo_Model_Promo extends Mage_Core_Model_Abstract {
...
public function setData($key, $data) {
...
return $this;
}
public function loadPost(array $data) {
$this->setData('name', $data['name'])->setData('title', $data['title']);
return $this;
}
}
|
Thanks for the great product! The co-workers love it, too (after some initial arm-twisting).