ChainResponsePolicy
class ChainResponsePolicy implements ChainResponsePolicyInterface (View source)
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:
- Returns static::DENY if any of the rules evaluated to static::DENY
- Otherwise returns NULL
Properties
| protected ResponsePolicyInterface[] | $rules | A list of policy rules to apply when this policy is checked. |
Methods
string|null
check(Response $response, Request $request)
Determines whether it is save to store a page in the cache.
$this
Details
string|null
check(Response $response, Request $request)
Determines whether it is save to store a page in the cache.
$this
addPolicy(ResponsePolicyInterface $policy)
Add a policy to the list of policy rules.