class ChainResponsePolicy

Implements a compound response policy.

When evaluating the compound policy, all of the contained rules are applied to the response. The overall result is computed according to the following rules:

<ol> <li>Returns static::DENY if any of the rules evaluated to static::DENY</li> <li>Otherwise returns NULL</li> </ol>

Hierarchy

File

core/lib/Drupal/Core/PageCache/ChainResponsePolicy.php, line 20

Namespace

Drupal\Core\PageCache

Members

Name Modifiers Type Description
ChainResponsePolicy::$rules protected property A list of policy rules to apply when this policy is checked.
ChainResponsePolicy::addPolicy public function Add a policy to the list of policy rules. Overrides ChainResponsePolicyInterface::addPolicy
ChainResponsePolicy::check public function Determines whether it is save to store a page in the cache. Overrides ResponsePolicyInterface::check
ResponsePolicyInterface::DENY constant Deny storage of a page in the cache.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!PageCache!ChainResponsePolicy.php/class/ChainResponsePolicy/8.1.x