Skip to content
Browse files

Improving auloader.

  • Loading branch information...
1 parent 04cdd61 commit 1a527521ae9741a67ed6c16213456d00c30d535d @davidpersson committed Feb 7, 2013
Showing with 7 additions and 1 deletion.
  1. +7 −1 bootstrap.php
View
8 bootstrap.php
@@ -13,7 +13,13 @@
*/
spl_autoload_register(function($class) {
- $file = __DIR__ . '/src/' . $class . '.php';
+ if (strpos($class, 'markup') === false) {
+ return false;
+ }
+ $name = str_replace('markup\\', '', $class);
+ $name = str_replace('\\', '/', $name);
+
+ $file = __DIR__ . '/src/' . $name . '.php';
if (file_exists($file)) {
require_once $file;

0 comments on commit 1a52752

Please sign in to comment.
Something went wrong with that request. Please try again.