File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
user_guide_src/source/incoming Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,8 @@ Specifying Route Handlers
8585Controller's Namespace
8686----------------------
8787
88- If a controller name is stated without beginning with ``\ ``, the :ref: `routing-default-namespace ` will be prepended:
88+ When you specify a controller and method name as a string,
89+ if a controller name is stated without beginning with ``\ ``, the :ref: `routing-default-namespace ` will be prepended:
8990
9091.. literalinclude :: routing/063.php
9192
@@ -114,6 +115,14 @@ Or using ``use`` keyword:
114115.. literalinclude :: routing/014.php
115116 :lines: 2-
116117
118+ If you forget ``use App\Controllers\Home; ``, the controller classname is interpreted
119+ as ``Config\Home ``, not ``App\Controllers\Home `` because **app/Config/Routes.php **
120+ has ``namespace Config; `` at the top.
121+
122+ .. note :: When you use Array Callable Syntax, the classname is always interpreted
123+ as a fully qualified classname. So :ref: `routing-default-namespace ` and
124+ :ref: `namespace option <assigning-namespace >` have no effect.
125+
117126Array Callable Syntax and Placeholders
118127^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
119128
You can’t perform that action at this time.
0 commit comments