I would like to inject interface app\models\IFoo
private $foo;
public function __construct($id, $module, IFoo $foo, array $config = [])
{
parent::__construct($id, $module, $config);
$this->foo = $foo;
}
How should I set container to correct resolving the dependency in concrete class app\models\Foo which implements IFoo?