Commit 82b75166 by Taylor Otwell

refactor the library detection in the autoloader.

parent c0c81083
...@@ -67,14 +67,14 @@ class Autoloader { ...@@ -67,14 +67,14 @@ class Autoloader {
} }
} }
// If the namespace exists in the libraries directory, we will assume the // If the file exists as-is in the libraries directory, we will assume the
// library is PSR-0 compliant, and will add the namespace to the array of // library is PSR-0 compliant, and will add the namespace to the array of
// libraries and load the class accordingly. // libraries and load the class accordingly.
if (is_dir(LIBRARY_PATH.$namespace)) if (file_exists($path = LIBRARY_PATH.str_replace('_', '/', $file)))
{ {
static::$libraries[] = $namespace; static::$libraries[] = $namespace;
return LIBRARY_PATH.str_replace('_', '/', $file); return $path;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment