mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-02 11:42:42 +01:00
25 lines
444 B
PHP
25 lines
444 B
PHP
|
<?php
|
||
|
|
||
|
/**
|
||
|
* Concrete HTTP sink which uses "echo" and "header()" to emit data.
|
||
|
*
|
||
|
* @group aphront
|
||
|
*/
|
||
|
final class AphrontPHPHTTPSink extends AphrontHTTPSink {
|
||
|
|
||
|
protected function emitHTTPStatus($code) {
|
||
|
if ($code != 200) {
|
||
|
header("HTTP/1.0 {$code}");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
protected function emitHeader($name, $value) {
|
||
|
header("{$name}: {$value}", $replace = false);
|
||
|
}
|
||
|
|
||
|
protected function emitData($data) {
|
||
|
echo $data;
|
||
|
}
|
||
|
|
||
|
}
|