Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
e8994064
Commit
e8994064
authored
May 23, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved docs about application and module namespace
fixes #3539
parent
6d4196d3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
5 deletions
+17
-5
Module.php
extensions/debug/Module.php
+1
-1
BaseYii.php
framework/BaseYii.php
+1
-0
Application.php
framework/base/Application.php
+7
-2
Module.php
framework/base/Module.php
+8
-2
No files found.
extensions/debug/Module.php
View file @
e8994064
...
...
@@ -31,7 +31,7 @@ class Module extends \yii\base\Module implements BootstrapInterface
*/
public
$allowedIPs
=
[
'127.0.0.1'
,
'::1'
];
/**
* @
var string the namespace that controller classes are in.
* @
inheritdoc
*/
public
$controllerNamespace
=
'yii\debug\controllers'
;
/**
...
...
framework/BaseYii.php
View file @
e8994064
...
...
@@ -266,6 +266,7 @@ class BaseYii
*
* @param string $className the fully qualified class name without a leading backslash "\"
* @throws UnknownClassException if the class does not exist in the class file
* @see the [guide section on autoloading][guide-concept-autoloading].
*/
public
static
function
autoload
(
$className
)
{
...
...
framework/base/Application.php
View file @
e8994064
...
...
@@ -81,8 +81,13 @@ abstract class Application extends Module
const
STATE_END
=
6
;
/**
* @var string the namespace that controller classes are in. If not set,
* it will use the "app\controllers" namespace.
* @var string the namespace that controller classes are located in.
* This namespace will be used to load controller classes by prepending it to the controller
* class name.
* The default namespace is "app\controllers".
*
* @see the [guide section on autoloading][guide-concept-autoloading] to learn more about
* defining namespaces and how classes are loaded.
*/
public
$controllerNamespace
=
'app\\controllers'
;
/**
...
...
framework/base/Module.php
View file @
e8994064
...
...
@@ -86,10 +86,16 @@ class Module extends ServiceLocator
*/
public
$controllerMap
=
[];
/**
* @var string the namespace that controller classes are in. If not set,
* it will use the "controllers" sub-namespace under the namespace of this module.
* @var string the namespace that controller classes are in.
* This namespace will be used to load controller classes by prepending it to the controller
* class name.
*
* If not set, it will use the `controllers` sub-namespace under the namespace of this module.
* For example, if the namespace of this module is "foo\bar", then the default
* controller namespace would be "foo\bar\controllers".
*
* @see the [guide section on autoloading][guide-concept-autoloading] to learn more about
* defining namespaces and how classes are loaded.
*/
public
$controllerNamespace
;
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment