/** * Constructor. * * @param StreamedResponse $response */ public function __construct(StreamedResponse $response) { parent::__construct($response->getStatusCode(), $response->headers->all()); $this->response = $response; }
/** * Creates the response object * * @param string|int $status * @param array $headers * @param resource $body * @return void */ function __construct($status = null, array $headers = null, $body = null) { parent::__construct($status, $headers, $body); // a JMAP response is always application/json $this->setHeader('Content-Type', 'application/json'); }
public function __construct() { parent::__construct(); static::setStatus(200); }