1 | <?php |
||
18 | abstract class AbstractRuleListener |
||
19 | { |
||
20 | /** |
||
21 | * @var array List of arrays with RuleMatcher, settings array |
||
22 | */ |
||
23 | private $rulesMap = array(); |
||
24 | |||
25 | /** |
||
26 | * Add a rule matcher with a list of header directives to apply if the |
||
27 | * request and response are matched. |
||
28 | * |
||
29 | * @param RuleMatcherInterface $ruleMatcher The headers apply to responses matched by this matcher |
||
30 | * @param array $settings An array of header configuration |
||
31 | */ |
||
32 | 27 | public function addRule( |
|
38 | |||
39 | /** |
||
40 | * Return the settings for the current request if any rule matches. |
||
41 | * |
||
42 | * @param Request $request |
||
43 | * @param Response $response |
||
44 | * |
||
45 | * @return array|false Settings to apply or false if no rule matched |
||
46 | */ |
||
47 | 22 | protected function matchRule(Request $request, Response $response) |
|
57 | } |
||
58 |