public function sendResponse($pHttpCode = '200', $pMessage)
    {
        $suppressStatusCode = isset($_GET['_suppress_status_code']) ? $_GET['_suppress_status_code'] : false;
        if ($this->controller->getHttpStatusCodes() &&
            !$suppressStatusCode &&
            php_sapi_name() !== 'cli'
        ) {

            $status = self::$statusCodes[intval($pHttpCode)];
            header('HTTP/1.0 ' . ($status ? $pHttpCode . ' ' . $status : $pHttpCode), true, $pHttpCode);
        } elseif (php_sapi_name() !== 'cli') {
            header('HTTP/1.0 200 OK');
        }

        $pMessage = array_reverse($pMessage, true);
        $pMessage['status'] = intval($pHttpCode);
        $pMessage = array_reverse($pMessage, true);

        $method = $this->getOutputFormatMethod($this->getOutputFormat());
        echo $this->$method($pMessage);
        exit;
    }
public function sendResponse($pHttpCode = '200', $pMessage)
    {
        $suppressStatusCode = isset($_GET['_suppress_status_code']) ? $_GET['_suppress_status_code'] : false;
        if ($this->controller->getHttpStatusCodes() &&
            !$suppressStatusCode &&
            php_sapi_name() !== 'cli'
        ) {

            $status = self::$statusCodes[intval($pHttpCode)];
            header('HTTP/1.0 ' . ($status ? $pHttpCode . ' ' . $status : $pHttpCode), true, $pHttpCode);
        } elseif (php_sapi_name() !== 'cli') {
            header('HTTP/1.0 200 OK');
        }

        $pMessage = array_reverse($pMessage, true);
        $pMessage['status'] = intval($pHttpCode);
        $pMessage = array_reverse($pMessage, true);

        $method = $this->getOutputFormatMethod($this->getOutputFormat());
        echo $this->$method($pMessage);
        exit;
    }
public function sendResponse ( $ pHttpCode = '200' , $ pMessage ) { $ suppressStatusCode = isset ( $ _GET [ '_suppress_status_code' ] ) ? $ _GET [ '_suppress_status_code' ] : false ; if ( $ this -> controller -> getHttpStatusCodes ( ) && ! $ suppressStatusCode && php_sapi_name ( ) !== 'cli' ) { $ status = self :: $ statusCodes [ intval ( $ pHttpCode ) ] ; header ( 'HTTP/1.0 ' . ( $ status ? $ pHttpCode . ' ' . $ status : $ pHttpCode ) , true , $ pHttpCode ) ; } elseif ( php_sapi_name ( ) !== 'cli' ) { header ( 'HTTP/1.0 200 OK' ) ; } $ pMessage = array_reverse ( $ pMessage , true ) ; $ pMessage [ 'status' ] = intval ( $ pHttpCode ) ; $ pMessage = array_reverse ( $ pMessage , true ) ; $ method = $ this -> getOutputFormatMethod ( $ this -> getOutputFormat ( ) ) ; echo $ this -> $ method ( $ pMessage ) ; exit ; }
Sends the actual response.

@param string $pHttpCode
@param        $pMessage
Sends the actual response .