autocomplete dependency injection container

I work with the dependency injection container of the Symphony framework.

Here's an example.

---------------------------------------
<?php
include_once('Pimple.php');
include_once('bar.php');

class index{

    /** @var pimple  */
    protected $pimple = null;

    /**
     * @param Pimple $pimple
     * @return $this
     */
    public function setPimple(Pimple $pimple)
    {
        $this->pimple = $pimple;

        return $this;
    }

    /**
     * @return $this
     */
    public function work()
    {
        $bar = $this->pimple['bar'];
        $bar->setBbb('abcd');

        return $this;
    }
}

$pimple = new Pimple();
$pimple['bar'] = function()
{
    return new bar();
};

$test = new index();
$test->setPimple($pimple);
$test->work();
---------------------------------------

Is there an autocomplete for $this->pimple['...'] ?

Your sincerly

Stephan

Please sign in to leave a comment.