最終更新:2018-03-13 (火) 16:54:36 (2238d)
composer.json/autoload
Top / composer.json / autoload
Autoload mapping for a PHP autoloader.
PSR-4 and PSR-0 autoloading, classmap generation and files includes are supported.
形式
PSR-4
- Under the psr-4 key you define a mapping from namespaces to paths, relative to the package root.
"autoload": { "psr-4": { "Controllers\\" : "controllers/", "Models\\" : "models/", "Models\\Sub\\" : "models/sub/" } }
- namespace? Controllers と宣言されたクラスは、controllers/の中
PSR-0
- Under the psr-0 key you define a mapping from namespaces to paths, relative to the package root