Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90364176
DiffusionGitLFSResponse.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Nov 1, 00:08
Size
777 B
Mime Type
text/x-php
Expires
Sun, Nov 3, 00:08 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22062617
Attached To
rPH Phabricator
DiffusionGitLFSResponse.php
View Options
<?php
final
class
DiffusionGitLFSResponse
extends
AphrontResponse
{
private
$content
;
public
static
function
newErrorResponse
(
$code
,
$message
)
{
// We can optionally include "request_id" and "documentation_url" in
// this response.
return
id
(
new
self
())
->
setHTTPResponseCode
(
$code
)
->
setContent
(
array
(
'message'
=>
$message
,
));
}
public
function
setContent
(
array
$content
)
{
$this
->
content
=
phutil_json_encode
(
$content
);
return
$this
;
}
public
function
buildResponseString
()
{
return
$this
->
content
;
}
public
function
getHeaders
()
{
$headers
=
array
(
array
(
'Content-Type'
,
'application/vnd.git-lfs+json'
),
);
return
array_merge
(
parent
::
getHeaders
(),
$headers
);
}
}
Event Timeline
Log In to Comment