| 1 | <?php |
||
| 21 | class CacheableResponseMatcher implements ResponseMatcherInterface |
||
| 22 | { |
||
| 23 | private $cacheableStatusCodes = [ |
||
| 24 | 200, 203, 204, 206, |
||
| 25 | 300, 301, |
||
| 26 | 404, 405, 410, 414, |
||
| 27 | 501, |
||
| 28 | ]; |
||
| 29 | |||
| 30 | 39 | public function __construct(array $additionalStatusCodes = []) |
|
| 31 | { |
||
| 32 | 39 | $this->cacheableStatusCodes = array_merge( |
|
| 33 | 39 | $this->cacheableStatusCodes, |
|
| 34 | $additionalStatusCodes |
||
| 35 | ); |
||
| 36 | 39 | } |
|
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | 28 | public function matches(Response $response) |
|
| 45 | } |
||
| 46 |