title: Composer autoload not working
body: <p>I'm using composer autoload for a mvc framework I've built. I've tested it and works on a Vagrant environment (config: <a href="http://pastebin.com/aAs2TFMh" rel="nofollow">http://pastebin.com/aAs2TFMh</a>) and even on Windows.</p>
  
  <p>I get this error: <code>{"error":{"type":"Whoops\\Exception\\ErrorException","message":"Class 'Elysium\\Controllers\\Error' not found","file":"\/home\/glendme\/public_html\/clubsmade\/src\/elysium\/core\/Router.php","line":99}}</code></p>
  
  <p>However when I deployed it on my vps with Ubuntu 13.04+php5.4 it started giving class not found errors. Same happened when I put it on a shared host.</p>
  
  <p>I tried self-update, removing vendor dir and composer install again at no avail.</p>
  
  <p>Here's my composer.json,</p>
  
  <pre><code>{
  "name": "glend/elysium",
  "description": "PHP MVC Framework.",
  "version" : "0.1.0-dev",
  "keywords" : ["mvc", "framework", "elysium", "glend"],
  "homepage" : "http://mvc.blueberry.al",
  "license" : "GPL-3.0+",
  "authors": [
      {
          "name": "Glend Gjermeni",
          "email": "contact@glend.me",
          "homepage": "http://glend.me",
          "role": "Developer"
      }
  ],
  "support": {
      "email": "support@blueberry.al"
  },
  "autoload": {
      "psr-0": {"Elysium": "src/"}
  },
  "require": {
      "filp/whoops": "1.*",
      "swiftmailer/swiftmailer": "*",
      "vlucas/valitron": "1.1.5",
      "ircmaxell/password-compat": "1.0.3"
  }
  </code></pre>
  
  <p>}</p>
  
  <p>And Router.php:</p>
  
  <pre><code>    &lt;?php
  
  namespace Elysium\Core;
  use Elysium\Controllers;
  
  /**
   * Manages all routing and URL requests for the framework.
   * @package Elysium\Core
   */
  class Router
  {
      private $url, $controller, $method, $params;
      private $allowedChars = array('-', '_', '/', '\\', '.');
  
      /**
       * Reads the passed URL from GET request into controller, method and params variables.
       */
      public function __construct()
      {
          if(!empty($_GET['page']))
          {
              if(ctype_alnum(str_replace($this-&gt;allowedChars, '', $_GET['page'])))
              {
                  $this-&gt;url = $_GET['page'];
              }
              else
              {
                  throw new Exception("Malformed URL");
              }
          }
          else
          {
              $this-&gt;url = 'index';
          }
  
          $this-&gt;url = explode('/', $this-&gt;url);
  
          $this-&gt;controller = implode('_', array_map('ucfirst', explode('_', str_replace('-', '_', array_shift($this-&gt;url)))));
          $this-&gt;method = explode('_', str_replace('-', '_', array_shift($this-&gt;url)));
  
          for($i = 1; $i &lt; count($this-&gt;method); $i++)
          {
              ucfirst($this-&gt;method[$i]);
          }
  
          $this-&gt;method = implode('_', $this-&gt;method);
          $this-&gt;params = &amp;$this-&gt;url;
      }
  
      /**
       * Initializes correct controller based on URL requested.
       */
      public function commit()
      {
          $class = "Elysium\\Controllers\\$this-&gt;controller";
  
          if(class_exists($class))
          {
              if(method_exists($class, $this-&gt;method))
              {
                  if(empty($this-&gt;params))
                  {
  
                      $ctrl = new $class;
                      $ctrl-&gt;{$this-&gt;method}();
                  }
                  else
                  {
                      $ctrl = new $class;
                      $ctrl-&gt;{$this-&gt;method}($this-&gt;params);
                  }
              }
              else if(empty($this-&gt;method))
              {
                  $ctrl = new $class;
                  $ctrl-&gt;index();
              }
              else
              {
                  self::error(404);
              }
          }
          else
          {
              self::error(404);
          }
      }
  
      /**
       * Initializes default Error controller based on error code provided and shows the appropriate error page.
       * @param $code
       */
      public static function error($code)
      {
          switch($code)
          {
              case 404:
              {
                  $ctrl = new Controllers\Error();
                  $ctrl-&gt;notFound();
                  break;
              }
              default:
              {
                  break;
              }
          }
      }
  }
  </code></pre>