Permalink
Browse files

Add basic autoloader

  • Loading branch information...
saltybeagle committed May 6, 2011
1 parent 620a45a commit 53459da1875aa06f1e0dcc8d7257098f082710d5
Showing with 11 additions and 0 deletions.
  1. +11 −0 autoload.php
View
@@ -0,0 +1,11 @@
+<?php
+
+set_include_path(__DIR__ . '/src');
+
+function autoload($class)
+{
+ require_once str_replace(array('\\', '_'), DIRECTORY_SEPARATOR, $class).'.php';
+}
+
+
+spl_autoload_register('autoload');

0 comments on commit 53459da

Please sign in to comment.