Aerys\StandardResponse::setStatus PHP Method

setStatus() public method

{@inheritDoc}
public setStatus ( integer $code ) : aerys\Response
$code integer
return aerys\Response
    public function setStatus(int $code) : Response
    {
        if ($this->state & self::STARTED) {
            throw new \LogicException("Cannot set status code; output already started");
        }
        assert($code >= 100 && $code <= 599, "Invalid HTTP status code [100-599] expected");
        $this->headers[":status"] = $code;
        return $this;
    }