Newbie question with autocompleting classes

Hello!

I'm giving PhpStorm a testdrive, and so far, I love it.  One quick question I have is how to get new classes created within php scripts to automatically complete my constructor function.  I did some online searching, and I think that I need to go to "Override Methods"; however, it's currently greyed out.  Any help would be appreciated.

-Eric

4 comments

I'm not sure what you mean. Can you be more specific or provide some sample code?

0

It's not actually code.  Basically, when I type the word class  Blah{ , phpStorm automatically spits out

class Blah{}

i.e. it adds in an extra brace, which is helpful.


It would be great, however, if it could spit out:

class Blah {
     public function __construct(){

     }

}


Does that make more sense?
0

You cannot do this automatically.

Either use "Code | Override Methods..." (invoke it while standing inside the class)

or create some custom Live Template (Settings | Live Templates).

0

Thank you for clearing this up for me!

0

Please sign in to leave a comment.