/** * Sends content for the current web response. * * @return DispatcherResponseTransportJson */ public function sendContent() { if (!empty($this->_padding)) { $response = $this->getResponse(); $response->setContent(sprintf('%s(%s);', $this->_padding, $response->getContent())); } return parent::sendContent(); }
/** * Sends content for the current web response. * * @return DispatcherResponseTransportRedirect */ public function sendContent() { $response = $this->getResponse(); $response->setContent(sprintf('<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="refresh" content="1;url=%1$s" /> <title>Redirecting to %1$s</title> </head> <body> Redirecting to <a href="%1$s">%1$s</a>. </body> </html>', htmlspecialchars($response->headers->get('Location'), ENT_QUOTES, 'UTF-8'))); return parent::sendContent(); }