improving a routing class*
<p>I use the class below to route all requests for php on my web application.  Can I improve upon this?</p>

<pre><code>/*route*/

class route
  {
  function __construct($a) 
    {
    if(isset($_FILES['ufile']['tmp_name']))  // handles file uploads
      {
      new upload();
      }
    elseif(isset($_POST['a'])) // handles AJAX
      {
      $b=$_POST['a']; 
      switch($b) 
        {
        case '0': 
          new signin(); 
          break; 
        case '1': 
          new signup(); 
          break; 
        case '2': 
          session::finish(); 
          break; 
        case '3': 
          new bookmark('insert'); 
          break; 
        case '3a': 
          new bookmark('delete'); 
          break; 
        case '4': 
          new tweet(); 
          break;
        default:
          echo "ajax route not found";
          break;
        }
      } 
    elseif($a!=0)  // handles views
      {
      new view($a);
      }
    else
      {
      // route not found
      }
    }
  }
</code></pre>

<p>Verification(passes)</p>

<pre><code>/*ROUTE
// Test Code - create entry
  new route(0);
  new route(1);
  $_FILES['ufile']['tmp_name']='test file';
  new route(0);
  unset($_FILES['ufile']['tmp_name']); 
  $_POST['a']=0;
  new route(0);
// Test Cases
  // Case 0:      echo "not routed: &lt;br&gt;";
  // Case 1:      echo "view created: $a &lt;br&gt;";
  // Case 2:      echo "file uploaded &lt;br&gt;";
  // Case 3:      echo "ajax responded: &lt;br&gt;";
*/
</code></pre>
