You are here

public function DefaultRequestPolicy::__construct in Drupal 8

Same name in this branch
  1. 8 core/lib/Drupal/Core/PageCache/DefaultRequestPolicy.php \Drupal\Core\PageCache\DefaultRequestPolicy::__construct()
  2. 8 core/modules/dynamic_page_cache/src/PageCache/RequestPolicy/DefaultRequestPolicy.php \Drupal\dynamic_page_cache\PageCache\RequestPolicy\DefaultRequestPolicy::__construct()
Same name and namespace in other branches
  1. 9 core/modules/dynamic_page_cache/src/PageCache/RequestPolicy/DefaultRequestPolicy.php \Drupal\dynamic_page_cache\PageCache\RequestPolicy\DefaultRequestPolicy::__construct()
  2. 10 core/modules/dynamic_page_cache/src/PageCache/RequestPolicy/DefaultRequestPolicy.php \Drupal\dynamic_page_cache\PageCache\RequestPolicy\DefaultRequestPolicy::__construct()

Constructs the default Dynamic Page Cache request policy.

File

core/modules/dynamic_page_cache/src/PageCache/RequestPolicy/DefaultRequestPolicy.php, line 20

Class

DefaultRequestPolicy
The default Dynamic Page Cache request policy.

Namespace

Drupal\dynamic_page_cache\PageCache\RequestPolicy

Code

public function __construct() {
  $this
    ->addPolicy(new CommandLineOrUnsafeMethod());
}