public function sendStatus(int $status, string $protocol = '')
    {
        if (headers_sent()) {
            throw $this->c::issue('Headers already sent.');
        }
        if (!$protocol && !($protocol = $_SERVER['SERVER_PROTOCOL'] ?? '')) {
            $protocol = 'HTTP/1.1'; // Default fallback.
        }
        header($protocol.' '.$status.' '.$this->getStatusTitle($status), true, $status);
    }
public function sendStatus(int $status, string $protocol = '')
    {
        if (headers_sent()) {
            throw $this->c::issue('Headers already sent.');
        }
        if (!$protocol && !($protocol = $_SERVER['SERVER_PROTOCOL'] ?? '')) {
            $protocol = 'HTTP/1.1'; // Default fallback.
        }
        header($protocol.' '.$status.' '.$this->getStatusTitle($status), true, $status);
    }
public function sendStatus ( int $ status , string $ protocol = '' ) { if ( headers_sent ( ) ) { throw $ this -> c :: issue ( 'Headers already sent.' ) ; } if ( ! $ protocol && ! ( $ protocol = $ _SERVER [ 'SERVER_PROTOCOL' ] ?? '' ) ) { $ protocol = 'HTTP/1.1' ; // Default fallback. } header ( $ protocol . ' ' . $ status . ' ' . $ this -> getStatusTitle ( $ status ) , true , $ status ) ; }
Status header.

@since 151121 Header utilities.

@param int    $status   Status code.
@param string $protocol Protocol.
Status header .