cakephp: autocomplete for models
I've been working on a cakephp project, and cakephp uses models assigned implicitly so they are used like this:
class Foo extends Controller {
// models to be used in the controller
$uses = array('Foo_model', 'Custom_model');
...
function someAction () {
// model usage
$this->Foo_model->find('all');
}
}
Is it possible to make a phpdoc hint or whatever to let the IDE know $this->Foo_model is an instance of Foo_model class in order to have it autocomplete model's methods?
Please sign in to leave a comment.
Add @property type $name to class-level PHPDOC, see http://manual.phpdoc.org/HTMLframesConverter/default/phpDocumentor/tutorial_tags.property.pkg.html
Thanks, Alexey, I will try this solution tomorrow, hopefully it will work for me