You are here

class ServiceUnavailableHttpException in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php \Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException

ServiceUnavailableHttpException.

@author Ben Ramsey <ben@benramsey.com>

Hierarchy

Expanded class hierarchy of ServiceUnavailableHttpException

2 files declare their use of ServiceUnavailableHttpException
FlattenExceptionTest.php in vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php
ImageStyleDownloadController.php in core/modules/image/src/Controller/ImageStyleDownloadController.php
Contains \Drupal\image\Controller\ImageStyleDownloadController.

File

vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php, line 19

Namespace

Symfony\Component\HttpKernel\Exception
View source
class ServiceUnavailableHttpException extends HttpException {

  /**
   * Constructor.
   *
   * @param int|string $retryAfter The number of seconds or HTTP-date after which the request may be retried
   * @param string     $message    The internal exception message
   * @param \Exception $previous   The previous exception
   * @param int        $code       The internal 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(503, $message, $previous, $headers, $code);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
HttpException::$headers private property
HttpException::$statusCode private property
HttpException::getHeaders public function Returns response headers. Overrides HttpExceptionInterface::getHeaders
HttpException::getStatusCode public function Returns the status code. Overrides HttpExceptionInterface::getStatusCode
ServiceUnavailableHttpException::__construct public function Constructor. Overrides HttpException::__construct