|
|
|
Re: Eclipse PDT Auto-Complete doesn't suggest Class methods [message #1072860 is a reply to message #1072681] |
Tue, 23 July 2013 17:02 |
|
You can use two scenario or both:
1. phpDoc in getInstance() method
2. /* @var $db DBConnection */ - comment, if phpDoc wont work.
See example:
/**
* @property int test more magic-property in code hints
* @method string test_method() more magic-method in code hints
*/
class DBConnection {
// ...
public $db_name;
public $db_user;
/**
* return DBConnection Instance
* @return DBConnection
*/
static function getInstance() {
}
// ...
}
$db = DBConnection::getInstance();
$db->| // see all of DBConnection
//or this:
$db_fix = null;
/* @var $db_fix DBConnection */ // tell pdt $db_fix-type
$db_fix->| // see all of DBConnection
[Updated on: Tue, 23 July 2013 17:08] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.02584 seconds