title: Where should I setup DI container in Yii2?
body: <p>I have an interface. And a class. The classimplements the interface and extends <code>BaseObject</code>. It's something like business logic service. I a'm going to inject it in a controlller via constructor. My target is use dependency from the interface.</p>
  <p>I'm looking on the <a href="https://www.yiiframework.com/doc/guide/2.0/en/concept-di-container#registering-dependencies" rel="nofollow noreferrer">documentation</a> and I don't understand, where should I write this code. Is it a parth of main config? Or it's some kind of new one config? Is it a separete file? If yse, how Yii2 will understand that it's DI configuration?</p>