Quellcode durchsuchen

Merge remote-tracking branch 'nickl/patch-1'

Jordi Boggiano vor 12 Jahren
Ursprung
Commit
b32677a8a6
1 geänderte Dateien mit 19 neuen und 1 gelöschten Zeilen
  1. 19 1
      doc/04-schema.md

+ 19 - 1
doc/04-schema.md

@@ -349,7 +349,10 @@ since it offers greater flexibility (no need to regenerate the autoloader when y
 classes).
 classes).
 
 
 Under the `psr-0` key you define a mapping from namespaces to paths, relative to the
 Under the `psr-0` key you define a mapping from namespaces to paths, relative to the
-package root. Note that this also supports the PEAR-style convention.
+package root. Note that this also supports the PEAR-style non-namespaced convention.
+
+The PSR-0 references are all combined, during install/update, into a single key => value 
+array which may be found in the generated file `vendor/composer/autoload_namespaces.php`.
 
 
 Example:
 Example:
 
 
@@ -372,6 +375,17 @@ you can specify them as an array as such:
         }
         }
     }
     }
 
 
+The PSR-0 style is not limited to namespace declarations only but may be 
+specified right down to the class level. This can be useful for libraries with 
+only one class in the global namespace. If the php source file is also located 
+in the root of the package, for example, it may be declared like this:
+
+    }
+        "autoload": {
+            "psr-0": { "UniqueGlobalClass": "" }
+        }
+    }
+
 If you want to have a fallback directory where any namespace can be, you can
 If you want to have a fallback directory where any namespace can be, you can
 use an empty prefix like:
 use an empty prefix like:
 
 
@@ -381,6 +395,10 @@ use an empty prefix like:
         }
         }
     }
     }
 
 
+The `classmap` references are all combined, during install/update, into a single 
+key => value array which may be found in the generated file 
+`vendor/composer/autoload_classmap.php`.
+
 You can use the classmap generation support to define autoloading for all libraries
 You can use the classmap generation support to define autoloading for all libraries
 that do not follow PSR-0. To configure this you specify all directories or files
 that do not follow PSR-0. To configure this you specify all directories or files
 to search for classes.
 to search for classes.