How to help to the IDE with factories and other methods

Hi !,
What should I do for adding code completion to factory methods?
That is, how can I say to the IDE (PHPStorm at really): "hey, this method call is returning an object of this class".
If the var or the factory method has a PHPDoc the IDE can handle everything, how can I add the same functionality without adding documentation?
Please can you point me in the right direction with that?

Thanks !!!
Enrique.

2 comments
Comment actions Permalink

Please be more specific.

+ http://youtrack.jetbrains.com/issue/WI-6027

As for Open API - PHP support does not have one yet.

0
Comment actions Permalink

Yes I know, that's why I'm writing my own plugin, and I want to know what is the best way to get autocomplete with factories, I think the IDE is capable of doing that, because if I add a PHPDoc to the factory, or the var, then the IDE understands what object/class it is and everything works.
I want to do the same without adding a PHPDoc, I guess this must be related with an extension point or something like that, should I register a new psi reference extension?
I'm asking for the correct and best way to achieve this in the IDE.

Can you tell me what should I do to tell the IDE what object is a factory without adding a PHPDoc?
Or, the same in a different question: why the IDE understand the factory if it has a PHPDoc? what is doing internally that PHPDoc? (I guess I just need the same thing...)

0

Please sign in to leave a comment.