Autoloading Traits in PHP
<p>Is there any way for me to differentiate between traits and classes in my autoload function? Say I have a folder of classes and a folder of traits; it would be nice to be able to do something like...</p>

<pre><code>spl_autoload_register(function($resource) {
  if ( /* $resource is class */ ) {
    include 'classes/'.$resource.'.php';
  } 
  if ( /* $resource is trait */ ) {
    include 'traits/'.$resource.'.php';
  }
});
</code></pre>
