I have the following models classes however netbeans 7.0.1 autocomplete doesn't work for row classes.
Model Class:
class Application_Model_DbTable_Payments extends Zend_Db_Table_Abstract {
protected $_name = 'payments';
protected $_rowClass = 'Application_Model_Payment';
}
Row Class:
class Application_Model_Payment extends Zend_Db_Table_Row_Abstract {
public function setIdentifier($identifier = null){
return $this->identifier = $identifier;
}
}
Code:
$paymentsModel = new Application_Model_DbTable_Payments();
$payment = $paymentsModel->find(1)->current();// return an Application_Model_Payment Object
$payment->setIdentifier();//doesn't appear on netbeans autocomplete, only Zend_Db_Table_Row methods appers
How could I make netbeans show row class methods?
Because netbeans uses heavily the docblock comments (and in this case find is an inherited method), unless you explicitly put the return type in the comment block for a method, Netbeans hasn't really got a clue what to do.
You can give it a hand though by doing adding a block like this:
like so in your code
It will 'hint' netbeans as to what the variable is.
UPDATE: Here is an example of doing it from the class/method declaration. In this example $something is instantiation of Application_Model_Token.