[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/aphront/sink/ -> AphrontPHPHTTPSink.php (source)

   1  <?php
   2  
   3  /**
   4   * Concrete HTTP sink which uses "echo" and "header()" to emit data.
   5   */
   6  final class AphrontPHPHTTPSink extends AphrontHTTPSink {
   7  
   8    protected function emitHTTPStatus($code, $message = '') {
   9      if ($code != 200) {
  10        $header = "HTTP/1.0 {$code}";
  11        if (strlen($message)) {
  12          $header .= " {$message}";
  13        }
  14        header($header);
  15      }
  16    }
  17  
  18    protected function emitHeader($name, $value) {
  19      header("{$name}: {$value}", $replace = false);
  20    }
  21  
  22    protected function emitData($data) {
  23      echo $data;
  24    }
  25  
  26  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1