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
43b8430e
Commit
43b8430e
authored
Mar 28, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improvement of Application::end() handling.
parent
c40ae859
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
Application.php
framework/base/Application.php
+11
-2
No files found.
framework/base/Application.php
View file @
43b8430e
...
@@ -199,8 +199,6 @@ abstract class Application extends Module
...
@@ -199,8 +199,6 @@ abstract class Application extends Module
$this
->
registerErrorHandlers
();
$this
->
registerErrorHandlers
();
Component
::
__construct
(
$config
);
Component
::
__construct
(
$config
);
$this
->
state
=
self
::
STATE_INIT
;
}
}
/**
/**
...
@@ -260,6 +258,8 @@ abstract class Application extends Module
...
@@ -260,6 +258,8 @@ abstract class Application extends Module
*/
*/
public
function
init
()
public
function
init
()
{
{
$this
->
state
=
self
::
STATE_INIT
;
$this
->
initExtensions
(
$this
->
extensions
);
$this
->
initExtensions
(
$this
->
extensions
);
foreach
(
$this
->
bootstrap
as
$class
)
{
foreach
(
$this
->
bootstrap
as
$class
)
{
/** @var BootstrapInterface $bootstrap */
/** @var BootstrapInterface $bootstrap */
...
@@ -346,6 +346,8 @@ abstract class Application extends Module
...
@@ -346,6 +346,8 @@ abstract class Application extends Module
*/
*/
public
function
run
()
public
function
run
()
{
{
try
{
$this
->
state
=
self
::
STATE_BEFORE_REQUEST
;
$this
->
state
=
self
::
STATE_BEFORE_REQUEST
;
$this
->
trigger
(
self
::
EVENT_BEFORE_REQUEST
);
$this
->
trigger
(
self
::
EVENT_BEFORE_REQUEST
);
...
@@ -361,6 +363,13 @@ abstract class Application extends Module
...
@@ -361,6 +363,13 @@ abstract class Application extends Module
$this
->
state
=
self
::
STATE_END
;
$this
->
state
=
self
::
STATE_END
;
return
$response
->
exitStatus
;
return
$response
->
exitStatus
;
}
catch
(
ExitException
$e
)
{
$this
->
end
(
$e
->
statusCode
,
isset
(
$response
)
?
$response
:
null
);
return
$e
->
statusCode
;
}
}
}
/**
/**
...
...
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