コード例 #1
0
 private function reformatLocationHeader(ResponseInterface $response)
 {
     $location = $response->getHeader('Location');
     if ($location && !preg_match('/^http[s]?:\\/\\//', $location)) {
         $response->setHeader('Location', $this->config->getConfig('site_protocol') . '://' . $this->config->getConfig('site_domain') . $location);
     }
 }
コード例 #2
0
 function filterResponse(ResponseInterface $response)
 {
     $printer = $this->getPrinter($this->getOutputType($response->getHeader('Content-Type')));
     $this->addDebugExecutionTime();
     $this->addDebugMemoryUsage();
     $response->setContent($printer->printDebug($this->debug, $response->getContent()));
     return $response;
 }