| 1 | <?php |
||
| 5 | final class SameSite |
||
| 6 | { |
||
| 7 | /** @var bool */ |
||
| 8 | private $strict; |
||
| 9 | |||
| 10 | /** @param bool $strict */ |
||
| 11 | 6 | private function __construct($strict) |
|
| 15 | |||
| 16 | /** @return self */ |
||
| 17 | 3 | public static function strict() |
|
| 21 | |||
| 22 | /** @return self */ |
||
| 23 | 4 | public static function lax() |
|
| 27 | |||
| 28 | /** |
||
| 29 | * @param string $sameSite |
||
| 30 | * |
||
| 31 | * @return self |
||
| 32 | * |
||
| 33 | * @throws \InvalidArgumentException if the given SameSite string is neither strict nor lax |
||
| 34 | */ |
||
| 35 | 3 | public static function fromString($sameSite) |
|
| 52 | |||
| 53 | /** @return string */ |
||
| 54 | 4 | public function asString() |
|
| 58 | } |
||
| 59 |