Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/sink/AphrontHTTPSink.php
| <?php | <?php | ||||
| /** | /** | ||||
| * Abstract class which wraps some sort of output mechanism for HTTP responses. | * Abstract class which wraps some sort of output mechanism for HTTP responses. | ||||
| * Normally this is just @{class:AphrontPHPHTTPSink}, which uses "echo" and | * Normally this is just @{class:AphrontPHPHTTPSink}, which uses "echo" and | ||||
| * "header()" to emit responses. | * "header()" to emit responses. | ||||
| * | * | ||||
| * Mostly, this class allows us to do install security or metrics hooks in the | * Mostly, this class allows us to do install security or metrics hooks in the | ||||
| * output pipeline. | * output pipeline. | ||||
| * | * | ||||
| * @task write Writing Response Components | * @task write Writing Response Components | ||||
| * @task emit Emitting the Response | * @task emit Emitting the Response | ||||
| * | |||||
| * @group aphront | |||||
| */ | */ | ||||
| abstract class AphrontHTTPSink { | abstract class AphrontHTTPSink { | ||||
| /* -( Writing Response Components )---------------------------------------- */ | /* -( Writing Response Components )---------------------------------------- */ | ||||
| /** | /** | ||||
| ▲ Show 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | |||||
| /* -( Emitting the Response )---------------------------------------------- */ | /* -( Emitting the Response )---------------------------------------------- */ | ||||
| abstract protected function emitHTTPStatus($code, $message = ''); | abstract protected function emitHTTPStatus($code, $message = ''); | ||||
| abstract protected function emitHeader($name, $value); | abstract protected function emitHeader($name, $value); | ||||
| abstract protected function emitData($data); | abstract protected function emitData($data); | ||||
| } | } | ||||