src/Controllers/AbstractController.php
protected function raw($data, $mime, $code = 200)
    {
        $this->response->setStatusCode($code);
        $this->response->headers->add(['Content-Type' => $mime]);
        $this->response->setContent($data);

        return $this->response;
    }
protected function raw($data, $mime, $code = 200)
    {
        $this->response->setStatusCode($code);
        $this->response->headers->add(['Content-Type' => $mime]);
        $this->response->setContent($data);

        return $this->response;
    }
protected function raw ( $ data , $ mime , $ code = 200 ) { $ this -> response -> setStatusCode ( $ code ) ; $ this -> response -> headers -> add ( [ 'Content-Type' => $ mime ] ) ; $ this -> response -> setContent ( $ data ) ; return $ this -> response ; }
Get a custom response.

@param string $data
@param string $mime
@param int    $code

@return \Symfony\Component\HttpFoundation\Response
Get a custom response .