Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93397941
PhutilGitHubResponse.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
Thu, Nov 28, 11:31
Size
882 B
Mime Type
text/x-php
Expires
Sat, Nov 30, 11:31 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22630412
Attached To
rPHU libphutil
PhutilGitHubResponse.php
View Options
<?php
final
class
PhutilGitHubResponse
extends
Phobject
{
private
$status
;
private
$headers
;
private
$body
;
public
function
setStatus
(
$status
)
{
$this
->
status
=
$status
;
return
$this
;
}
public
function
getStatus
()
{
return
$this
->
status
;
}
public
function
setBody
(
array
$body
)
{
$this
->
body
=
$body
;
return
$this
;
}
public
function
getBody
()
{
return
$this
->
body
;
}
public
function
setHeaders
(
array
$headers
)
{
$this
->
headers
=
$headers
;
return
$this
;
}
public
function
getHeaders
()
{
return
$this
->
headers
;
}
public
function
getHeaderValue
(
$key
,
$default
=
null
)
{
$key
=
phutil_utf8_strtolower
(
$key
);
foreach
(
$this
->
headers
as
$header
)
{
list
(
$hkey
,
$value
)
=
$header
;
if
(
phutil_utf8_strtolower
(
$hkey
)
===
$key
)
{
return
$value
;
}
}
return
$default
;
}
}
Event Timeline
Log In to Comment