CacheableServiceUnavailableHttpException.php 742 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace Drupal\Core\Http\Exception;
  3. use Drupal\Core\Cache\CacheableDependencyInterface;
  4. use Drupal\Core\Cache\CacheableDependencyTrait;
  5. use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException;
  6. /**
  7. * A cacheable ServiceUnavailableHttpException.
  8. */
  9. class CacheableServiceUnavailableHttpException extends ServiceUnavailableHttpException implements CacheableDependencyInterface {
  10. use CacheableDependencyTrait;
  11. /**
  12. * {@inheritdoc}
  13. */
  14. public function __construct(CacheableDependencyInterface $cacheability, $retryAfter = NULL, $message = NULL, \Exception $previous = NULL, $code = 0) {
  15. $this->setCacheability($cacheability);
  16. parent::__construct($retryAfter, $message, $previous, $code);
  17. }
  18. }