| 1 | <?php |
||
| 9 | class Cookie implements CookieInterface |
||
| 10 | { |
||
| 11 | |||
| 12 | protected $cookie; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * instanciate |
||
| 16 | * |
||
| 17 | */ |
||
| 18 | 4 | public function __construct() |
|
| 22 | |||
| 23 | /** |
||
| 24 | * get cookie value from cookie name |
||
| 25 | * |
||
| 26 | * @param string $name |
||
| 27 | * @return string |
||
| 28 | */ |
||
| 29 | 1 | public function getCookie(string $name): string |
|
| 33 | |||
| 34 | /** |
||
| 35 | * set cookie value for cookie name and ttl |
||
| 36 | * |
||
| 37 | * @param string $name |
||
| 38 | * @param string $value |
||
| 39 | * @param integer $ttl |
||
| 40 | * @return CookieInterface |
||
| 41 | */ |
||
| 42 | 1 | public function setCookie(string $name, string $value, int $ttl): CookieInterface |
|
| 47 | |||
| 48 | /** |
||
| 49 | * refresh cookie from global |
||
| 50 | * |
||
| 51 | * @return CookieInterface |
||
| 52 | */ |
||
| 53 | 1 | protected function refreshCookie(): CookieInterface |
|
| 58 | } |
||
| 59 |