Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes #1389

  • Loading branch information...
commit 04264bbd6275e1b1852dbd57d3fab910e10fe346 1 parent 56551a9
@samdark samdark authored
Showing with 15 additions and 3 deletions.
  1. +15 −3 docs/guide/basics.namespace.txt
View
18 docs/guide/basics.namespace.txt
@@ -142,9 +142,15 @@ Namespaced Controllers
----------------------
By default Yii uses controllers from the global namespace. These classes are
-located under `protected/controllers`. To change this behavior you can configure
-`controllerMap` property of your application. The best way to do it is to use the
-configuration file (`protected/config/main.php`):
+located under `protected/controllers`. You can change this behavior in two
+different ways: using `controllerMap` and using `controllerNamespace`. The former
+allows you using controllers from various namespaces. The later requires less
+configuration while setting a common namespace for all controllers.
+
+### Using `controllerMap`
+
+The best way to do change controller map is to use the configuration file
+(`protected/config/main.php`):
~~~
[php]
@@ -184,6 +190,12 @@ class TestController extends \CController
}
~~~
+
+### Using `controllerNamespace`
+
+Since application is the module itself, you can use `controllerNamespace` property
+in the same way as described in "Namespaced Modules" below.
+
Namespaced Modules
------------------
Please sign in to comment.
Something went wrong with that request. Please try again.