title: How can I inject interface into controller's constructor in Yii2
body: <p>I would like to inject interface <code>app\models\IFoo</code></p>
  
  <pre><code>private $foo;
  
  public function __construct($id, $module, IFoo $foo, array $config = [])
  {
      parent::__construct($id, $module, $config);
      $this-&gt;foo = $foo;
  }
  </code></pre>
  
  <p>How should I set container to correct resolving the dependency in concrete class <code>app\models\Foo</code> which implements <code>IFoo</code>?</p>