Browse Source

Add support for adding more than one fallback dir

Jordi Boggiano 13 năm trước cách đây
mục cha
commit
ec352b1e84
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      src/Composer/Autoload/ClassLoader.php

+ 3 - 1
src/Composer/Autoload/ClassLoader.php

@@ -65,7 +65,9 @@ class ClassLoader
     public function add($prefix, $paths)
     {
         if (!$prefix) {
-            $this->fallbackDirs = (array) $paths;
+            foreach ((array) $paths as $path) {
+                $this->fallbackDirs[] = $path;
+            }
             return;
         }
         if (isset($this->prefixes[$prefix])) {