You are here

public function TooManyRequestsHttpException::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php \Symfony\Component\HttpKernel\Exception\TooManyRequestsHttpException::__construct()

Constructor.

Parameters

int|string $retryAfter The number of seconds or HTTP-date after which the request may be retried:

string $message The internal exception message:

\Exception $previous The previous exception:

int $code The internal exception code:

Overrides HttpException::__construct

File

vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php, line 31

Class

TooManyRequestsHttpException
TooManyRequestsHttpException.

Namespace

Symfony\Component\HttpKernel\Exception

Code

public function __construct($retryAfter = null, $message = null, \Exception $previous = null, $code = 0) {
  $headers = array();
  if ($retryAfter) {
    $headers = array(
      'Retry-After' => $retryAfter,
    );
  }
  parent::__construct(429, $message, $previous, $headers, $code);
}