[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.pdt] Re: Code completion...

The only way PDT can tell what type $this->MyModel is, is if you write a PHPDoc comment.

Given that it's cakephp and the mymodel object is created via some hidden runtime voodoo, there's no way for PDT to tell what type it is.

You can try adding a doc comment identifying it to your controller, hopefully cake will play nice with that.


Eugen wrote:
I don't know if this was brought up before, or what its referred to, but I work with cakePHP a lot, and I run into a problem that I don't get code completion on custom Models when I reference them from the controller.
For example I will have my userModel.php


class MyModel extends AppModel {
   var $name;

}

and in my userController.php I will have
class UserController extends AppController {
    echo $this->MyModel->save($this->form(data);

}


$this->MyModel->[code completion jumps in] does anyone have a glue how to make this work?