File manager - Edit - /home/autoph/public_html/connectv1/src/Utilities/Cookie.php
Back
<?php namespace App\Utilities; /** * Cookie: * * @author Igor Veselov <dev@xfor.top> */ class Cookie { /** * Delete: * @access public * @param string $key * @return void */ public static function delete($key) { self::put($key, '', time() - 1); } /** * Exists: * @access public * @param string $key * @return boolean */ public static function exists($key): bool { return isset($_COOKIE[$key]); } /** * Get: Returns the value of a specific key of the COOKIE super-global * @access public * @param string $key * @return string */ public static function get($key): string { if(self::exists($key)){ return $_COOKIE[$key]; }else{ return ''; } } /** * Put: * @access public * @param string $key * @param string $value * @param integer $expiry * @return boolean */ public static function put($key, $value, $expiry): bool { return setcookie($key, $value, time() + $expiry, '/'); } }
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings