PHP: Provide magic method references?

已回答

I have implemented a CompletionContributor that knows about existing magic-methods in given PHP classes.

When completed, MethodReference Psi Elements are created correctly, but the "method not found" inspection fires and thus the accessed method is presented as non-existent to the user.

I know the PHP plugin can work with `@method` doc tags and provide virtual methods.

What are my options to provide virtual methods for a given class programmatically?

0

Hello!

Unfortunately, for now there is no way to provide custom references on method call programatically. I created technical issue about this ability: https://youtrack.jetbrains.com/issue/WI-42266.

Also we have issue about resolving magic methods via __call - https://youtrack.jetbrains.com/issue/WI-16002.

0

请先登录再写评论。