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