File tree Expand file tree Collapse file tree
user_guide_src/source/concepts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ You may change this namespace by editing the **app/Config/Constants.php** file a
6767new namespace value under the ``APP_NAMESPACE `` setting:
6868
6969.. literalinclude :: autoloader/002.php
70+ :lines: 2-
7071
7172You will need to modify any existing files that are referencing the current namespace.
7273
Original file line number Diff line number Diff line change 11<?php
22
3- $ psr4 = [
4- 'App ' => APPPATH ,
5- 'CodeIgniter ' => SYSTEMPATH ,
6- ];
3+ namespace Config ;
4+
5+ use CodeIgniter \Config \AutoloadConfig ;
6+
7+ class Autoload extends AutoloadConfig
8+ {
9+ // ...
10+ public $ psr4 = [
11+ APP_NAMESPACE => APPPATH , // For custom app namespace
12+ 'Config ' => APPPATH . 'Config ' ,
13+ ];
14+
15+ // ...
16+ }
Original file line number Diff line number Diff line change 11<?php
22
3- define ('APP_NAMESPACE ' , 'App ' );
3+ defined ( ' APP_NAMESPACE ' ) || define ('APP_NAMESPACE ' , 'App ' );
Original file line number Diff line number Diff line change 11<?php
22
3- $ classmap = [
4- 'Markdown ' => APPPATH . 'third_party/markdown.php ' ,
5- ];
3+ namespace Config ;
4+
5+ use CodeIgniter \Config \AutoloadConfig ;
6+
7+ class Autoload extends AutoloadConfig
8+ {
9+ // ...
10+ public $ classmap = [
11+ 'Markdown ' => APPPATH . 'third_party/markdown.php ' ,
12+ ];
13+
14+ // ...
15+ }
You can’t perform that action at this time.
0 commit comments