Add sub-sections for autoload docs
parent
a7cc5f187f
commit
cac0e71d45
|
@ -354,11 +354,13 @@ Example:
|
||||||
|
|
||||||
Autoload mapping for a PHP autoloader.
|
Autoload mapping for a PHP autoloader.
|
||||||
|
|
||||||
Currently [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md)
|
Currently [`PSR-0`](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md)
|
||||||
autoloading, classmap generation and files are supported. PSR-0 is the recommended way though
|
autoloading, `classmap` generation and `files` are supported. PSR-0 is the recommended way though
|
||||||
since it offers greater flexibility (no need to regenerate the autoloader when you add
|
since it offers greater flexibility (no need to regenerate the autoloader when you add
|
||||||
classes).
|
classes).
|
||||||
|
|
||||||
|
#### PSR-0
|
||||||
|
|
||||||
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 non-namespaced convention.
|
package root. Note that this also supports the PEAR-style non-namespaced convention.
|
||||||
|
|
||||||
|
@ -406,6 +408,8 @@ use an empty prefix like:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#### Classmap
|
||||||
|
|
||||||
The `classmap` references are all combined, during install/update, into a single
|
The `classmap` references are all combined, during install/update, into a single
|
||||||
key => value array which may be found in the generated file
|
key => value array which may be found in the generated file
|
||||||
`vendor/composer/autoload_classmap.php`.
|
`vendor/composer/autoload_classmap.php`.
|
||||||
|
@ -422,6 +426,8 @@ Example:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#### Files
|
||||||
|
|
||||||
If you want to require certain files explicitly on every request then you can use
|
If you want to require certain files explicitly on every request then you can use
|
||||||
the 'files' autoloading mechanism. This is useful if your package includes PHP functions
|
the 'files' autoloading mechanism. This is useful if your package includes PHP functions
|
||||||
that cannot be autoloaded by PHP.
|
that cannot be autoloaded by PHP.
|
||||||
|
|
Loading…
Reference in New Issue