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
551e00ba
Commit
551e00ba
authored
Jun 09, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed methods and events in Application.
parent
0656b875
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
Application.php
framework/yii/base/Application.php
+17
-11
No files found.
framework/yii/base/Application.php
View file @
551e00ba
...
...
@@ -17,8 +17,14 @@ use Yii;
*/
class
Application
extends
Module
{
const
EVENT_BEFORE_REQUEST
=
'beforeRequest'
;
const
EVENT_AFTER_REQUEST
=
'afterRequest'
;
/**
* @event Event an event that is triggered at the beginning of [[run()]].
*/
const
EVENT_BEFORE_RUN
=
'beforeRun'
;
/**
* @event Event an event that is triggered at the end of [[run()]].
*/
const
EVENT_AFTER_RUN
=
'afterRun'
;
/**
* @var string the application name.
*/
...
...
@@ -148,7 +154,7 @@ class Application extends Module
if
(
!
$this
->
_ended
)
{
$this
->
_ended
=
true
;
$this
->
getResponse
()
->
end
();
$this
->
afterR
equest
();
$this
->
afterR
un
();
}
if
(
$exit
)
{
...
...
@@ -163,29 +169,29 @@ class Application extends Module
*/
public
function
run
()
{
$this
->
beforeR
equest
();
$this
->
beforeR
un
();
$response
=
$this
->
getResponse
();
$response
->
begin
();
$status
=
$this
->
processRequest
();
$response
->
end
();
$this
->
afterR
equest
();
$this
->
afterR
un
();
return
$status
;
}
/**
* Raises the [[EVENT_BEFORE_R
EQUEST
]] event right BEFORE the application processes the request.
* Raises the [[EVENT_BEFORE_R
UN
]] event right BEFORE the application processes the request.
*/
public
function
beforeR
equest
()
public
function
beforeR
un
()
{
$this
->
trigger
(
self
::
EVENT_BEFORE_R
EQUEST
);
$this
->
trigger
(
self
::
EVENT_BEFORE_R
UN
);
}
/**
* Raises the [[EVENT_AFTER_R
EQUEST
]] event right AFTER the application processes the request.
* Raises the [[EVENT_AFTER_R
UN
]] event right AFTER the application processes the request.
*/
public
function
afterR
equest
()
public
function
afterR
un
()
{
$this
->
trigger
(
self
::
EVENT_AFTER_R
EQUEST
);
$this
->
trigger
(
self
::
EVENT_AFTER_R
UN
);
}
/**
...
...
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