Netbeans di autocomplete

Hi,

How to do it to work autocomplete for Dependency Injector in netbeans?

Thanks

edited Apr '17

Thanks for reply but this not solve my problem.

for example in service.php I have defined

$di->set('session', function()
{
    $session = new SessionAdapter();
    $session->start();
    return $session;
});

and if I try write in controller or view

    $this ->

session class is not prompted.



60.8k

the only way for now is everytime you use a variable to do so

/** @var \MyNameSpace\MyClass $data */
    $session = $this->di->get("session");

there is an idea for the moment, for jetbrains ( phpstorm ) plugin that will help with this kind of stuff

Thanks for information.

I currently use very similar solution

$session = &$this->session;
/** @var \Phalcon\Session\Adapter $session */

but this is unconfortable and not elegant :(

edited Apr '17

$this->session; what is $this? Use injectable class or just set propety phpdoc.

If it's not prompted then most likely you don't have ide stubs?