<?php

namespace Velis\Http\Response;

trait PdfResponseTrait
{
    /**
     * Generate pdf file
     */
    private function pdfResponse(string $filename, string $content)
    {
        $this->response
            ->setHeader("Content-Disposition", "attachment; filename=$filename")
            ->setContentType('application/pdf')
            ->setContent($content);
    }
}
