/** * Sets the HTTP Status code. * * @param int $httpStatus * * @throws InvalidArgumentException */ public static function setStatus($httpStatus) { if (strpos($httpStatus, "\n") !== false) { throw new InvalidArgumentException('Illegal http-status "' . $httpStatus . '", contains newlines'); } self::$httpStatus = $httpStatus; }