CacheablePreconditionFailedHttpException.php 709 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\PreconditionFailedHttpException;
  6. /**
  7. * A cacheable PreconditionFailedHttpException.
  8. */
  9. class CacheablePreconditionFailedHttpException extends PreconditionFailedHttpException implements CacheableDependencyInterface {
  10. use CacheableDependencyTrait;
  11. /**
  12. * {@inheritdoc}
  13. */
  14. public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
  15. $this->setCacheability($cacheability);
  16. parent::__construct($message, $previous, $code);
  17. }
  18. }