Contao\Template::getResponse PHP Method

getResponse() public method

Return a response object
public getResponse ( ) : Response
return Symfony\Component\HttpFoundation\Response The response object
    public function getResponse()
    {
        $this->compile();
        $response = new Response($this->strBuffer);
        $response->headers->set('Vary', 'User-Agent', false);
        $response->headers->set('Content-Type', $this->strContentType . '; charset=' . Config::get('characterSet'));
        return $response;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Return a response object
  *
  * @param bool $blnCheckRequest If true, check for unsued $_GET parameters
  *
  * @return Response The response object
  */
 public function getResponse($blnCheckRequest = false)
 {
     $this->compile($blnCheckRequest);
     return parent::getResponse();
 }
All Usage Examples Of Contao\Template::getResponse