Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102361184
AphrontIsolatedHTTPSink.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
Wed, Feb 19, 22:00
Size
666 B
Mime Type
text/x-php
Expires
Fri, Feb 21, 22:00 (2 d)
Engine
blob
Format
Raw Data
Handle
24338527
Attached To
rPH Phabricator
AphrontIsolatedHTTPSink.php
View Options
<?php
/**
* Isolated HTTP sink for testing.
*
* @group aphront
*/
final
class
AphrontIsolatedHTTPSink
extends
AphrontHTTPSink
{
private
$status
;
private
$headers
;
private
$data
;
protected
function
emitHTTPStatus
(
$code
,
$message
=
''
)
{
$this
->
status
=
$code
;
}
protected
function
emitHeader
(
$name
,
$value
)
{
$this
->
headers
[]
=
array
(
$name
,
$value
);
}
protected
function
emitData
(
$data
)
{
$this
->
data
.=
$data
;
}
public
function
getEmittedHTTPStatus
()
{
return
$this
->
status
;
}
public
function
getEmittedHeaders
()
{
return
$this
->
headers
;
}
public
function
getEmittedData
()
{
return
$this
->
data
;
}
}
Event Timeline
Log In to Comment