From 2b0308013df6492fdccf8ac36f29e90458b45862 Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Sun, 9 Jun 2013 00:12:26 +0300 Subject: [PATCH] simplify autoloader --- ipf.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/ipf.php b/ipf.php index 68a1270..572660f 100644 --- a/ipf.php +++ b/ipf.php @@ -2,18 +2,7 @@ function IPF_Autoload($class_name) { - $filename = strtolower(str_replace('_', '/', $class_name)) . '.php'; - if (file_exists($filename)) { - require_once $filename; - return; - } - foreach (explode(PATH_SEPARATOR, get_include_path()) as $dir) { - $path = $dir . DIRECTORY_SEPARATOR . $filename; - if (file_exists($path)) { - require_once($path); - break; - } - } + require_once strtolower(str_replace('_', '/', $class_name)) . '.php'; } spl_autoload_register('IPF_Autoload'); -- 2.49.0