| 1 | <?php |
||
| 7 | class ArrayStore implements StoreInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * List of the known HSTS hosts |
||
| 11 | * |
||
| 12 | * @var array[] |
||
| 13 | */ |
||
| 14 | private $store = []; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Set the given domain name as a known HSTS host |
||
| 18 | * |
||
| 19 | * @param string $domainName |
||
| 20 | * @param int $expirySeconds |
||
| 21 | * @param array $policy |
||
| 22 | */ |
||
| 23 | 15 | public function set($domainName, $expirySeconds, array $policy) |
|
| 33 | |||
| 34 | /** |
||
| 35 | * Check if the given domain name is a known HSTS host |
||
| 36 | * |
||
| 37 | * @param string $domainName |
||
| 38 | * @return bool|array |
||
| 39 | */ |
||
| 40 | 20 | public function get($domainName) |
|
| 52 | |||
| 53 | /** |
||
| 54 | * Forget the given domain name as a known HSTS host |
||
| 55 | * |
||
| 56 | * @param string $domainName |
||
| 57 | */ |
||
| 58 | 4 | public function delete($domainName) |
|
| 62 | } |
||
| 63 |