-
-
Save nbomberger/5475091 to your computer and use it in GitHub Desktop.
PSR-0 Compliant autoloader.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Small PSR-0 compliant autloader | |
*/ | |
<?php | |
set_include_path(get_include_path().PATH_SEPARATOR.__DIR__); | |
spl_autoload_register( | |
function ($c) { | |
@include preg_replace('#\\\|_(?!.*\\\)#','/',$c).'.php'; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment