title: PHP DI and casting interface
body: <p>I do not understand, for example I'm using php-di container,
  I have ClassA and ClassB, both of them are implements Intreface1
  And I'm creating objects of this two classes thru DI    </p>
  
  <p>Now when I'm injecting ClassA to the constructor I need inject exactly this class, which crate a dependency of this classA, not an Intreface1</p>
  
  <p>Can I somehow say that this particular ClassA should implement intrefeca1 ? 
  In docs of PHP-DI I found </p>
  
  <pre><code>  // mapping an interface to an implementation
      'LoggerInterface' =&gt; DI\create('MyLogger'),
  </code></pre>
  
  <p>But I do not understand how it works, LoggerIntreace it's just a string which   maps this text to to the object  </p>