da1lbi3
da1lbi3

Reputation: 4519

Code completion @property PhpStorm

My system is using CodeIgniter 3.x with PhpStorm, I had no Code completion so I used this:

https://github.com/nicolas-goudry/CI-PHPStorm-Code-Completion

This works like a charm. I have added the file in the project root.

But now I'm using the hmvc model. And it is not working anymore. When I'm in the CodeIgniter "normal" Model, View, Controller classes it works. But when I'm in my module folder it doesn't work. Does Somebody knows an solution?

Edit

I'm a bit closer, the classes where the autocomplete doesn't work extends the MX_Controller. When I change this to CI_Controller it works. So how can I make it work with MX_Controller?

Upvotes: 1

Views: 250

Answers (1)

cartalot
cartalot

Reputation: 3148

I am just guessing but maybe adding

class MX_Controller {
    public function __construct() {
    } 
}

or whatever the class is really called, and then your models etc above it, like the example file. (looks at the github page) Arggh yeah it was nice of him to credit me but I don't know why he never listened to the simplest way to do this - just name the file autocomplete.php and put it in the application/config folder. Done! Thats it! Finito. And you do not have to mark any files as plain text with that method. So actually try that first before adding anything to the file. And post back if you can so we can share with others trying the same thing.

Upvotes: 1

Related Questions