title: PHP adding custom namespace using autoloader from composer
body: <p>Here is my folder structure:</p>
  
  <pre><code>Classes
    - CronJobs
      - Weather
        - WeatherSite.php
  </code></pre>
  
  <p>I want to load WeatherSite class from my script. Im using composer with autoload:</p>
  
  <pre><code>$loader = include(LIBRARY .'autoload.php');
  $loader-&gt;add('Classes\Weather',CLASSES .'cronjobs/weather');
  $weather = new Classes\Weather\WeatherSite();
  </code></pre>
  
  <p>Im assuming the above code is adding the namespace and the path that namespace resolves to. But when the page loads I always get this error:</p>
  
  <pre><code> Fatal error: Class 'Classes\Weather\WeatherSite' not found
  </code></pre>
  
  <p>Here is my WeatherSite.php file:</p>
  
  <pre><code>namespace Classes\Weather;
  
  class WeatherSite {
  
      public function __construct()
      {
  
      }
  
      public function findWeatherSites()
      {
  
      }
  
  }
  </code></pre>
  
  <p>What am I doing wrong?</p>