/** * Send response * * @return void */ public function sendResponse() { if ($this->_filePath && $this->getHttpResponseCode() == 200) { $this->_transferAdapter->send($this->_filePath); } else { parent::sendResponse(); } }
/** * {@inheritdoc} */ public function sendResponse() { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'sendResponse'); if (!$pluginInfo) { return parent::sendResponse(); } else { return $this->___callPlugins('sendResponse', func_get_args(), $pluginInfo); } }
/** * Error handler for developer mode * * @param Bootstrap $bootstrap * @param \Exception $exception * @return bool */ private function handleDeveloperMode(Bootstrap $bootstrap, \Exception $exception) { if ($bootstrap->isDeveloperMode()) { $this->_response->setHttpResponseCode(500); $this->_response->setHeader('Content-Type', 'text/plain'); $this->_response->setBody($exception->getMessage() . "\n" . $exception->getTraceAsString()); $this->_response->sendResponse(); return true; } return false; }
/** * Error handler for developer mode * * @param Bootstrap $bootstrap * @param \Exception $exception * @return bool */ private function handleDeveloperMode(Bootstrap $bootstrap, \Exception $exception) { if ($bootstrap->isDeveloperMode()) { if (Bootstrap::ERR_IS_INSTALLED == $bootstrap->getErrorCode()) { try { $this->redirectToSetup($bootstrap, $exception); return true; } catch (\Exception $e) { $exception = $e; } } $this->_response->setHttpResponseCode(500); $this->_response->setHeader('Content-Type', 'text/plain'); $this->_response->setBody($this->buildContentFromException($exception)); $this->_response->sendResponse(); return true; } return false; }
protected function assertHeaderNotPresent($name) { $this->interceptedResponse->sendResponse(); $this->assertFalse($this->interceptedResponse->getHeader($name)); }