public function response(string $content = '', int $statusCode = StatusCode::OK, array $headers = []): Response
    {
        /** @var Response $response */
        $response = $this->container()->getSingleton(Response::class);

        if (\func_num_args() === 0) {
            return $response;
        }

        return $response->create($content, $statusCode, $headers);
    }
public function response(string $content = '', int $statusCode = StatusCode::OK, array $headers = []): Response
    {
        /** @var Response $response */
        $response = $this->container()->getSingleton(Response::class);

        if (\func_num_args() === 0) {
            return $response;
        }

        return $response->create($content, $statusCode, $headers);
    }
public function response ( string $ content = '' , int $ statusCode = StatusCode :: OK , array $ headers = [ ] ) : Response { /** @var Response $response */ $ response = $ this -> container ( ) -> getSingleton ( Response :: class ) ; if ( \ func_num_args ( ) === 0 ) { return $ response ; } return $ response -> create ( $ content , $ statusCode , $ headers ) ; }
Return a new response from the application.

@param string $content    [optional] The content to set
@param int    $statusCode [optional] The status code to set
@param array  $headers    [optional] The headers to set

@throws \InvalidArgumentException

@return \Valkyrja\Http\Response
Return a new response from the application .