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
95bfd825
Commit
95bfd825
authored
Jun 10, 2013
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed unnecessary defaul value from Response
parent
1d2185f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
Response.php
framework/yii/web/Response.php
+10
-4
No files found.
framework/yii/web/Response.php
View file @
95bfd825
...
...
@@ -93,7 +93,7 @@ class Response extends \yii\base\Response
415
=>
'Unsupported Media Type'
,
416
=>
'Requested range unsatisfiable'
,
417
=>
'Expectation failed'
,
418
=>
'I
’
m a teapot'
,
418
=>
'I
\'
m a teapot'
,
422
=>
'Unprocessable entity'
,
423
=>
'Locked'
,
424
=>
'Method failure'
,
...
...
@@ -117,6 +117,9 @@ class Response extends \yii\base\Response
511
=>
'Network Authentication Required'
,
);
/**
* @var integer the HTTP status code to send with the response.
*/
private
$_statusCode
;
/**
* @var HeaderCollection
...
...
@@ -144,6 +147,9 @@ class Response extends \yii\base\Response
parent
::
end
();
}
/**
* @return integer the HTTP status code to send with the response.
*/
public
function
getStatusCode
()
{
return
$this
->
_statusCode
;
...
...
@@ -298,7 +304,7 @@ class Response extends \yii\base\Response
* @param string $attachmentName the file name shown to the user.
* @param string $mimeType the MIME type of the content.
*/
public
function
sendContentAsFile
(
$content
,
$attachmentName
=
'file'
,
$mimeType
=
'application/octet-stream'
)
public
function
sendContentAsFile
(
$content
,
$attachmentName
,
$mimeType
=
'application/octet-stream'
)
{
$this
->
getHeaders
()
->
addDefault
(
'Pragma'
,
'public'
)
...
...
@@ -321,7 +327,7 @@ class Response extends \yii\base\Response
* @param string $mimeType the MIME type of the stream content.
* @throws HttpException if the requested range cannot be satisfied.
*/
public
function
sendStreamAsFile
(
$handle
,
$attachmentName
=
'file'
,
$mimeType
=
'application/octet-stream'
)
public
function
sendStreamAsFile
(
$handle
,
$attachmentName
,
$mimeType
=
'application/octet-stream'
)
{
$headers
=
$this
->
getHeaders
();
fseek
(
$handle
,
0
,
SEEK_END
);
...
...
@@ -573,7 +579,7 @@ class Response extends \yii\base\Response
}
/**
* @return boolean whether this response is successful
ly
* @return boolean whether this response is successful
*/
public
function
isSuccessful
()
{
...
...
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