| Total Complexity | 3 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class Cookie{ |
||
| 6 | |||
| 7 | /** |
||
| 8 | * set a cookie |
||
| 9 | * @param string $name |
||
| 10 | * @param string $value |
||
| 11 | * @param string $expireDate |
||
| 12 | */ |
||
| 13 | public function setCookie(string $name, string $value, string $expireDate) |
||
| 16 | } |
||
| 17 | |||
| 18 | /** |
||
| 19 | * delete a named cookie |
||
| 20 | * @param string $name |
||
| 21 | */ |
||
| 22 | public function deleteCookie(string $name) |
||
| 23 | { |
||
| 24 | setcookie($name, "", time()-3600); //expire the cookie |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * get a cookie |
||
| 29 | * @param string $name |
||
| 30 | * @return bool |
||
| 31 | */ |
||
| 32 | public function getCookie(string $name) |
||
| 35 | |||
| 36 | } |
||
| 37 | } |