idea-php-toolbox icon indicating copy to clipboard operation
idea-php-toolbox copied to clipboard

TypeProvider for classes got via return contributor

Open King2500 opened this issue 9 years ago • 1 comments

I couldn't get TypeProvider working on getExtension:

$this->get('twig')->getExtension('core')->{caret}

It only shows the standard Twig_ExtensionInterface methods, but not the ones got from the Twig_Extension_Core (or any other/user) extension, which is provided by name.

{
    "registrar": [
        {
            "provider": "twig.extensions",
            "language": "php",
            "signatures": [
                {
                    "class": "Twig_Environment",
                    "method": "getExtension",
                    "type": "type"
                }
            ]
        }
    ],
    "providers": [
        {
            "name": "twig.extensions",
            "source": {
                "contributor": "return",
                "parameter": "Twig_ExtensionInterface:getName"
            }
        }
    ]
}

King2500 avatar Jul 10 '16 17:07 King2500

For reference: http://twig.sensiolabs.org/api/master/Twig_ExtensionInterface.html http://twig.sensiolabs.org/api/master/Twig_Extension_Core.html

King2500 avatar Jul 10 '16 17:07 King2500