Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CacheableHttpException.php

class CacheableHttpException

A cacheable HttpException.

Hierarchy

  • class \Symfony\Component\HttpKernel\Exception\HttpException extends \Symfony\Component\HttpKernel\Exception\RuntimeException implements \Symfony\Component\HttpKernel\Exception\HttpExceptionInterface
    • class \Drupal\Core\Http\Exception\CacheableHttpException extends \Symfony\Component\HttpKernel\Exception\HttpException implements \Drupal\Core\Cache\CacheableDependencyInterface uses \Drupal\Core\Cache\CacheableDependencyTrait

Expanded class hierarchy of CacheableHttpException

1 file declares its use of CacheableHttpException
ResourceVersionRouteEnhancer.php in core/modules/jsonapi/src/Revisions/ResourceVersionRouteEnhancer.php

File

core/lib/Drupal/Core/Http/Exception/CacheableHttpException.php, line 12

Namespace

Drupal\Core\Http\Exception
View source
class CacheableHttpException extends HttpException implements CacheableDependencyInterface {
    use CacheableDependencyTrait;
    
    /**
     * {@inheritdoc}
     */
    public function __construct(CacheableDependencyInterface $cacheability, $statusCode = 0, $message = '', ?\Exception $previous = NULL, array $headers = [], $code = 0) {
        $this->setCacheability($cacheability);
        parent::__construct($statusCode, $message, $previous, $headers, $code);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
CacheableDependencyTrait::$cacheContexts protected property Cache contexts.
CacheableDependencyTrait::$cacheMaxAge protected property Cache max-age.
CacheableDependencyTrait::$cacheTags protected property Cache tags.
CacheableDependencyTrait::getCacheContexts public function 4
CacheableDependencyTrait::getCacheMaxAge public function 4
CacheableDependencyTrait::getCacheTags public function 4
CacheableDependencyTrait::setCacheability protected function Sets cacheability; useful for value object constructors.
CacheableHttpException::__construct public function Overrides HttpException::__construct
HttpException::fromStatusCode public static function
HttpException::getHeaders public function Returns response headers. Overrides HttpExceptionInterface::getHeaders
HttpException::getStatusCode public function Returns the status code. Overrides HttpExceptionInterface::getStatusCode
HttpException::setHeaders public function

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal