1.2.3. Status Code Setting the Code

final public setCode(?int $code) : static

Sets the status code for the Response; a buffered equivalent of http_response_code($code).

The method is fluent, allowing you to chain a call to another Response method. Getting the Code

final public getCode() : ?int

Returns the the status code for the response.