From 3154d9c027b68a1a899f8ac987ec0cb372889ee4 Mon Sep 17 00:00:00 2001 From: Dave Date: Tue, 24 Mar 2020 16:23:24 -0700 Subject: [PATCH] Revise modules documentation page Trying to make explanation of auto-discovery as it pertains to the acme/blog example more clear. --- user_guide_src/source/general/modules.rst | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/user_guide_src/source/general/modules.rst b/user_guide_src/source/general/modules.rst index a1a9da75b3c1..793675a07ac0 100644 --- a/user_guide_src/source/general/modules.rst +++ b/user_guide_src/source/general/modules.rst @@ -78,13 +78,10 @@ file types, including: This is configured in the file **app/Config/Modules.php**. -The auto-discovery system works by scanning any psr4 namespaces that have been defined within **Config/Autoload.php** -for familiar directories/files. +The auto-discovery system works by scanning for particular directories and files within psr4 namespaces that have been defined in **Config/Autoload.php**. -When at the **acme** namespace above, we would need to make one small adjustment to make it so the files could be found: -each "module" within the namespace would have to have it's own namespace defined there. **Acme** would be changed -to **Acme\Blog**. Once your module folder has been defined, the discover process would look for a Routes file, for example, -at **/acme/Blog/Config/Routes.php**, just as if it was another application. +To make auto-discovery work for our **Blog** namespace, we need to make one small adjustment. +**Acme** needs to be changed to **Acme\\Blog** because each "module" within the namespace needs to be fully defined. Once your module folder path is defined, the discovery process would look for discoverable items on that path and should, for example, find the routes file at **/acme/Blog/Config/Routes.php**. Enable/Disable Discover =======================