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
fa198518
Commit
fa198518
authored
Jun 15, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:yiisoft/yii2
parents
2d118a4c
ecb703c3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
23 deletions
+4
-23
Application.php
framework/yii/base/Application.php
+2
-2
Application.php
framework/yii/console/Application.php
+1
-19
Application.php
framework/yii/web/Application.php
+1
-2
No files found.
framework/yii/base/Application.php
View file @
fa198518
...
@@ -139,7 +139,7 @@ abstract class Application extends Module
...
@@ -139,7 +139,7 @@ abstract class Application extends Module
*/
*/
public
function
run
()
public
function
run
()
{
{
$response
=
$this
->
handle
(
$this
->
getRequest
());
$response
=
$this
->
handle
Request
(
$this
->
getRequest
());
$response
->
send
();
$response
->
send
();
return
$response
->
exitStatus
;
return
$response
->
exitStatus
;
}
}
...
@@ -153,7 +153,7 @@ abstract class Application extends Module
...
@@ -153,7 +153,7 @@ abstract class Application extends Module
* @param Request $request the request to be handled
* @param Request $request the request to be handled
* @return Response the resulting response
* @return Response the resulting response
*/
*/
abstract
public
function
handle
(
$request
);
abstract
public
function
handle
Request
(
$request
);
private
$_runtimePath
;
private
$_runtimePath
;
...
...
framework/yii/console/Application.php
View file @
fa198518
...
@@ -89,7 +89,7 @@ class Application extends \yii\base\Application
...
@@ -89,7 +89,7 @@ class Application extends \yii\base\Application
* @param Request $request the request to be handled
* @param Request $request the request to be handled
* @return Response the resulting response
* @return Response the resulting response
*/
*/
public
function
handle
(
$request
)
public
function
handle
Request
(
$request
)
{
{
list
(
$route
,
$params
)
=
$request
->
resolve
();
list
(
$route
,
$params
)
=
$request
->
resolve
();
$result
=
$this
->
runAction
(
$route
,
$params
);
$result
=
$this
->
runAction
(
$route
,
$params
);
...
@@ -103,24 +103,6 @@ class Application extends \yii\base\Application
...
@@ -103,24 +103,6 @@ class Application extends \yii\base\Application
}
}
/**
/**
* Processes the request.
* The request is represented in terms of a controller route and action parameters.
* @return integer the exit status of the controller action (0 means normal, non-zero values mean abnormal)
* @throws Exception if the script is not running from the command line
*/
public
function
processRequest
()
{
/** @var $request Request */
$request
=
$this
->
getRequest
();
if
(
$request
->
getIsConsoleRequest
())
{
list
(
$route
,
$params
)
=
$request
->
resolve
();
return
$this
->
runAction
(
$route
,
$params
);
}
else
{
throw
new
Exception
(
\Yii
::
t
(
'yii'
,
'This script must be run from the command line.'
));
}
}
/**
* Returns the response component.
* Returns the response component.
* @return Response the response component
* @return Response the response component
*/
*/
...
...
framework/yii/web/Application.php
View file @
fa198518
...
@@ -53,7 +53,7 @@ class Application extends \yii\base\Application
...
@@ -53,7 +53,7 @@ class Application extends \yii\base\Application
* @return Response the resulting response
* @return Response the resulting response
* @throws HttpException if the requested route is invalid
* @throws HttpException if the requested route is invalid
*/
*/
public
function
handle
(
$request
)
public
function
handle
Request
(
$request
)
{
{
Yii
::
setAlias
(
'@wwwroot'
,
dirname
(
$request
->
getScriptFile
()));
Yii
::
setAlias
(
'@wwwroot'
,
dirname
(
$request
->
getScriptFile
()));
Yii
::
setAlias
(
'@www'
,
$request
->
getBaseUrl
());
Yii
::
setAlias
(
'@www'
,
$request
->
getBaseUrl
());
...
@@ -78,7 +78,6 @@ class Application extends \yii\base\Application
...
@@ -78,7 +78,6 @@ class Application extends \yii\base\Application
}
catch
(
InvalidRouteException
$e
)
{
}
catch
(
InvalidRouteException
$e
)
{
throw
new
HttpException
(
404
,
$e
->
getMessage
(),
$e
->
getCode
(),
$e
);
throw
new
HttpException
(
404
,
$e
->
getMessage
(),
$e
->
getCode
(),
$e
);
}
}
}
}
private
$_homeUrl
;
private
$_homeUrl
;
...
...
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