Skip to content

Commit 38e686f

Browse files
authored
Merge pull request #2290 from romaven/modules-psr4-doc-fix
Fix Code Modules documentation for psr4 namespace configuration
2 parents 2e448a5 + 2edf7db commit 38e686f

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

user_guide_src/source/general/modules.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ directory in the main project root::
3232

3333
Open **app/Config/Autoload.php** and add the **Acme** namespace to the ``psr4`` array property::
3434

35-
public $psr4 = [
36-
'Acme' => ROOTPATH.'acme'
35+
$psr4 = [
36+
'Config' => APPPATH . 'Config',
37+
APP_NAMESPACE => APPPATH, // For custom namespace
38+
'App' => APPPATH, // To ensure filters, etc still found,
39+
'Acme' => ROOTPATH.'acme'
3740
];
3841

3942
Now that this is setup we can access any file within the **acme** folder through the ``Acme`` namespace. This alone

0 commit comments

Comments
 (0)