Skip to content
Browse files

Add basic autoloader

  • Loading branch information...
1 parent 620a45a commit 53459da1875aa06f1e0dcc8d7257098f082710d5 @saltybeagle saltybeagle committed May 5, 2011
Showing with 11 additions and 0 deletions.
  1. +11 −0 autoload.php
View
11 autoload.php
@@ -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.
Something went wrong with that request. Please try again.