title: including external library in Yii
body: <p>How can I call these library functions from anywhere in my Yii app? I have a library:</p>
  
  <pre><code>#mylib.php
  
  &lt;?php
  class MyLib {
      public function foo()
      {
          echo "hello!";
      }
  }
  </code></pre>
  
  <p>and want to be able to call this function throughout my Yii app:</p>
  
  <pre><code>MyLib::foo();
  </code></pre>
  
  <p>I don't know where to place my library or how/where to import it. This is just an example of what I'm trying to do but I am trying to make a library that has multiple namespaces so I can access the library and have access to all the namespaces after importing it.</p>