Skip to content

Commit 9f9634a

Browse files
committed
docs: add explanation
1 parent 43b81c4 commit 9f9634a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

user_guide_src/source/concepts/autoloader.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ CodeIgniter4 Autoloader
1919

2020
CodeIgniter provides a very flexible autoloader that can be used with very little configuration.
2121
It can locate individual namespaced classes that adhere to
22-
`PSR-4 <https://www.php-fig.org/psr/psr-4/>`_ autoloading
23-
directory structures.
22+
`PSR-4`_ autoloading directory structures.
23+
24+
.. _PSR-4: https://www.php-fig.org/psr/psr-4/
2425

2526
The autoloader works great by itself, but can also work with other autoloaders, like
2627
`Composer <https://getcomposer.org>`_, or even your own custom autoloaders, if needed.
@@ -60,6 +61,12 @@ those classes can be found in:
6061
The key of each row is the namespace itself. This does not need a trailing back slash.
6162
The value is the location to the directory the classes can be found in.
6263

64+
By default, the namespace ``App`` is located in the **app** directory, and the
65+
namespace ``Config`` is located in the ``app/Config`` directory.
66+
67+
If you create class files in the locations and according to `PSR-4`_, the autoloader
68+
will autoload them.
69+
6370
.. _confirming-namespaces:
6471

6572
Confirming Namespaces

0 commit comments

Comments
 (0)