Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / lib / Drupal / Core / Http / Exception / CacheableUnauthorizedHttpException.php
diff --git a/web/core/lib/Drupal/Core/Http/Exception/CacheableUnauthorizedHttpException.php b/web/core/lib/Drupal/Core/Http/Exception/CacheableUnauthorizedHttpException.php
new file mode 100644 (file)
index 0000000..1931caa
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+
+namespace Drupal\Core\Http\Exception;
+
+use Drupal\Core\Cache\CacheableDependencyInterface;
+use Drupal\Core\Cache\CacheableDependencyTrait;
+use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
+
+/**
+ * A cacheable UnauthorizedHttpException.
+ */
+class CacheableUnauthorizedHttpException extends UnauthorizedHttpException implements CacheableDependencyInterface {
+
+  use CacheableDependencyTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function __construct(CacheableDependencyInterface $cacheability, $challenge, $message = NULL, \Exception $previous = NULL, $code = 0) {
+    $this->setCacheability($cacheability);
+    parent::__construct($challenge, $message, $previous, $code);
+  }
+
+}