We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Netbeans di autocomplete


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


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();
    return $session;

and if I try write in controller or view

    $this ->  

session class is not prompted.


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?