protected function throwStatus($statusCode, $statusMessage = null, $content = null)
    {
        $this->response->setStatus($statusCode, $statusMessage);
        if ($content === null) {
            $content = $this->response->getStatus();
        }
        $this->response->setContent($content);
        throw new StopActionException();
    }
protected function throwStatus($statusCode, $statusMessage = null, $content = null)
    {
        $this->response->setStatus($statusCode, $statusMessage);
        if ($content === null) {
            $content = $this->response->getStatus();
        }
        $this->response->setContent($content);
        throw new StopActionException();
    }
protected function throwStatus ( $ statusCode , $ statusMessage = null , $ content = null ) { $ this -> response -> setStatus ( $ statusCode , $ statusMessage ) ; if ( $ content === null ) { $ content = $ this -> response -> getStatus ( ) ; } $ this -> response -> setContent ( $ content ) ; throw new StopActionException ( ) ; }
Sends the specified HTTP status immediately.

NOTE: This method only supports web requests and will throw an exception if used with other request types.

TODO: statusMessage argument is deprecated and will no longer be used from 6.0

@param integer $statusCode The HTTP status code
@param string $statusMessage A custom HTTP status message
@param string $content Body content which further explains the status
@throws UnsupportedRequestTypeException If the request is not a web request
@throws StopActionException
@api
Sends the specified HTTP status immediately .