Dependency Injection, get, I set an object, code completion, phpdoc?

so I set something with DI:

$di->setShared('env', function() { return MyOwnClass(); });

and reach it

$this->getDI()->get('env')

or

$this->getDI()->getEnv()

but now there is no chance to use autocompletion by my IDE. Is there a way to set "what 'env' is" ? Its class?



829

In PhpStorm you may use Phpdoc for autocomplete mechanism

/**

* Class CoreController

*

* @package Core\Controllers

* @property-read \Phalcon\Http\Request request

*/