title: Class auto loader Yii2
body: <p>I created a new directory at root '<em>components</em>'. Then I put a file '<em>ClassName.php</em>' into this folder. Declare a namespace <code>namespace components;</code> and the class named <code>ClassName</code>  Now I try to use it like </p>
  
  <pre><code>$c = new app\components\ClassName()
  </code></pre>
  
  <p>But there's an error. It says that <code>Class 'components\ClassName' not found</code>. 
  Where am I missing? I suppose that I should add folder components in include_path or something like that. Please help to understand.</p>