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
6b41d41f
Commit
6b41d41f
authored
Aug 03, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #711.
parent
62dee149
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
Application.php
framework/yii/base/Application.php
+10
-0
Module.php
framework/yii/base/Module.php
+1
-7
No files found.
framework/yii/base/Application.php
View file @
6b41d41f
...
@@ -180,6 +180,16 @@ abstract class Application extends Module
...
@@ -180,6 +180,16 @@ abstract class Application extends Module
}
}
/**
/**
* Returns an ID that uniquely identifies this module among all modules within the current application.
* Since this is an application instance, it will always return an empty string.
* @return string the unique ID of the module.
*/
public
function
getUniqueId
()
{
return
''
;
}
/**
* Runs the application.
* Runs the application.
* This is the main entrance of an application.
* This is the main entrance of an application.
* @return integer the exit status (0 means normal, non-zero values mean abnormal)
* @return integer the exit status (0 means normal, non-zero values mean abnormal)
...
...
framework/yii/base/Module.php
View file @
6b41d41f
...
@@ -192,13 +192,7 @@ abstract class Module extends Component
...
@@ -192,13 +192,7 @@ abstract class Module extends Component
*/
*/
public
function
getUniqueId
()
public
function
getUniqueId
()
{
{
if
(
$this
instanceof
Application
)
{
return
$this
->
module
?
ltrim
(
$this
->
module
->
getUniqueId
()
.
'/'
.
$this
->
id
,
'/'
)
:
$this
->
id
;
return
''
;
}
elseif
(
$this
->
module
)
{
return
ltrim
(
$this
->
module
->
getUniqueId
()
.
'/'
.
$this
->
id
,
'/'
);
}
else
{
return
$this
->
id
;
}
}
}
/**
/**
...
...
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