setStatus() public méthode

Set the HTTP status code for the response.
public setStatus ( integer $statusCode ) : ResponseBuilder
$statusCode integer
Résultat ResponseBuilder
 /**
  * Set the HTTP status code for the response.
  *
  * @param  int $statusCode
  * @return self
  * @throws \InvalidArgumentException
  */
 public function setStatus(int $statusCode) : ResponseBuilder
 {
     if ($statusCode < 400 || $statusCode >= 600) {
         throw new InvalidArgumentException("{$statusCode} is not a valid error HTTP status code.");
     }
     return parent::setStatus($statusCode);
 }