Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F561774
AphrontIsolatedHTTPSink.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
645 B
Referenced Files
None
Subscribers
None
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
;
}
public
function
getEmittedHTTPStatus
()
{
return
$this
->
status
;
}
public
function
getEmittedHeaders
()
{
return
$this
->
headers
;
}
public
function
getEmittedData
()
{
return
$this
->
data
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 13, 12:32 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
100733
Default Alt Text
AphrontIsolatedHTTPSink.php (645 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment