class ServiceUnavailableHttpException

ServiceUnavailableHttpException.

@author Ben Ramsey <ben@benramsey.com>

Hierarchy

Expanded class hierarchy of ServiceUnavailableHttpException

2 files declare their use of ServiceUnavailableHttpException
FlattenExceptionTest.php in drupal/core/vendor/symfony/debug/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php
image.module in drupal/core/modules/image/image.module
Exposes global functionality for creating image styles.

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/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 integer     $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