I don't underestant why in send() method are two parameters. You don't use it anyway.
In my opintion, it will be better just without or with default value:
/**
* Sends response to output.
* @return void
*/
public function send(IRequest $httpRequest = NULL, IResponse $httpResponse = NULL) {
// ...
}
Then you can use it anywhare without unnecessary dependencies:
$template = $this->createTemplate()->setFile( /* ... */ );
$template->data = $data;
$pdf = new PdfResponse($template);
$pdf->outputName = $fileName;
$pdf->outputDestination = PdfResponse::OUTPUT_FILE;
$pdf->send();
Maybe I just missing something important.
I don't underestant why in send() method are two parameters. You don't use it anyway.
In my opintion, it will be better just without or with default value:
Then you can use it anywhare without unnecessary dependencies:
Maybe I just missing something important.