_transferAdapter = $transferAdapter; } /** * Send response * * @return void */ public function sendResponse() { if ($this->_filePath && $this->getHttpResponseCode() == 200) { $options = [ 'filepath' => $this->_filePath, 'headers' => $this->getHeaders(), ]; $this->_transferAdapter->send($options); } else { parent::sendResponse(); } } /** * @param string $path * @return void */ public function setFilePath($path) { $this->_filePath = $path; } }