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
98bd4041
Commit
98bd4041
authored
Oct 21, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjusted calling sequence within init().
parent
5bf7ed94
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
Module.php
framework/yii/base/Module.php
+3
-1
No files found.
framework/yii/base/Module.php
View file @
98bd4041
...
@@ -168,16 +168,18 @@ abstract class Module extends Component
...
@@ -168,16 +168,18 @@ abstract class Module extends Component
* This method is called after the module is created and initialized with property values
* This method is called after the module is created and initialized with property values
* given in configuration. The default implementation will create a path alias using the module [[id]]
* given in configuration. The default implementation will create a path alias using the module [[id]]
* and then call [[preloadComponents()]] to load components that are declared in [[preload]].
* and then call [[preloadComponents()]] to load components that are declared in [[preload]].
*
* If you override this method, please make sure you call the parent implementation.
*/
*/
public
function
init
()
public
function
init
()
{
{
$this
->
preloadComponents
();
if
(
$this
->
controllerNamespace
===
null
)
{
if
(
$this
->
controllerNamespace
===
null
)
{
$class
=
get_class
(
$this
);
$class
=
get_class
(
$this
);
if
((
$pos
=
strrpos
(
$class
,
'\\'
))
!==
false
)
{
if
((
$pos
=
strrpos
(
$class
,
'\\'
))
!==
false
)
{
$this
->
controllerNamespace
=
substr
(
$class
,
0
,
$pos
)
.
'\\controllers'
;
$this
->
controllerNamespace
=
substr
(
$class
,
0
,
$pos
)
.
'\\controllers'
;
}
}
}
}
$this
->
preloadComponents
();
}
}
/**
/**
...
...
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