Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93238574
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, Nov 27, 06:40
Size
703 B
Mime Type
text/x-php
Expires
Fri, Nov 29, 06:40 (2 d)
Engine
blob
Format
Raw Data
Handle
22599381
Attached To
rPH Phabricator
AphrontIsolatedHTTPSink.php
View Options
<?php
/**
* Isolated HTTP sink for testing.
*/
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
;
}
protected
function
isWritable
()
{
return
true
;
}
public
function
getEmittedHTTPStatus
()
{
return
$this
->
status
;
}
public
function
getEmittedHeaders
()
{
return
$this
->
headers
;
}
public
function
getEmittedData
()
{
return
$this
->
data
;
}
}
Event Timeline
Log In to Comment