/** * {@inheritdoc} */ public function prepare(Response $response, $buffer = null) { if ($this->headers) { $response->header('Content-Type', $this->contentType); if ($this->asAttachment) { $response->header('Content-Disposition', 'attachment; filename="' . $this->name . '"'); } if ($this->contentLength) { $response->header('Content-Length', $this->contentLength); } } }
/** * {@inheritdoc} */ public function prepare(Response $response, $buffer = null) { $response->header('Content-Type', 'application/json; charset=UTF-8'); $this->encoded = json_encode($this->data); }
/** * {@inheritdoc} */ public function prepare(Response $response, $buffer = null) { $file = $this->fileName ? $this->fileName : date('Y-m-d'); $response->header('Content-Type', 'text/csv; charset=' . $this->charset); $response->header('Content-disposition', 'attachment; filename=' . $file . '.csv'); $response->header('Pragma', 'no-cache'); }
/** * {@inheritdoc} */ public function prepare(Response $response, $buffer = null) { $response->header('Content-Type', 'text/html; charset=UTF-8'); $this->set('debug', $buffer); }
/** * {@inheritdoc} */ public function prepare(Response $response, $buffer = null) { $response->header('Content-Type', $this->format . '; charset=UTF-8'); $this->set('signature', $this->getSignatureKey()); $this->set('buffer', $buffer); $this->compiled = $this->render(); }