Http Cookies utilities Ubiquity\utils\http$UCookie This class is part of Ubiquity.
More...
|
static | set ($name, $value, $duration=60 *60 *24, $path='/', $secure=false, $httpOnly=false) |
| Sends a cookie.
|
|
static | get ($name, $default=null) |
| Returns the Cookie with the name $name.
|
|
static | delete ($name, $path='/') |
| Removes the cookie with the name $name.
|
|
static | deleteAll ($path='/') |
| Deletes all cookies.
|
|
static | exists ($name) |
| Tests the existence of a cookie.
|
|
static | setRaw ($name, $value, $duration=60 *60 *24, $path='/', $secure=false, $httpOnly=false) |
| Sends a raw cookie without urlencoding the cookie value.
|
|
static | filter (string $key, int $filter=\FILTER_DEFAULT, $default=null) |
| Gets a specific cookie by name and optionally filters it.
|
|
static | setTransformer (TransformerInterface $transformer) |
|
static | getTransformerClass () |
|
Http Cookies utilities Ubiquity\utils\http$UCookie This class is part of Ubiquity.
- Author
- jcheron myadd.nosp@m.ress.nosp@m.mail@.nosp@m.gmai.nosp@m.l.com
- Version
- 1.1.4
Definition at line 16 of file UCookie.php.
◆ delete()
static delete |
( |
|
$name, |
|
|
|
$path = '/' |
|
) |
| |
|
static |
Removes the cookie with the name $name.
- Parameters
-
Definition at line 64 of file UCookie.php.
◆ deleteAll()
static deleteAll |
( |
|
$path = '/' | ) |
|
|
static |
◆ exists()
Tests the existence of a cookie.
- Parameters
-
- Returns
- boolean
- Since
- Ubiquity 2.0.11
Definition at line 87 of file UCookie.php.
◆ filter()
static filter |
( |
string |
$key, |
|
|
int |
$filter = \FILTER_DEFAULT , |
|
|
|
$default = null |
|
) |
| |
|
static |
Gets a specific cookie by name and optionally filters it.
- Parameters
-
string | $key | |
int | $filter | |
mixed | null | $default | |
- Returns
- mixed|null
Definition at line 117 of file UCookie.php.
◆ get()
static get |
( |
|
$name, |
|
|
|
$default = null |
|
) |
| |
|
static |
Returns the Cookie with the name $name.
- Parameters
-
string | $name | |
mixed | $default | |
- Returns
- mixed
Definition at line 50 of file UCookie.php.
◆ getTransformerClass()
static getTransformerClass |
( |
| ) |
|
|
static |
◆ set()
static set |
( |
|
$name, |
|
|
|
$value, |
|
|
|
$duration = 60 * 60 * 24 , |
|
|
|
$path = '/' , |
|
|
|
$secure = false , |
|
|
|
$httpOnly = false |
|
) |
| |
|
static |
Sends a cookie.
- Parameters
-
string | $name | the name of the cookie |
string | $value | The value of the cookie. |
int | $duration | default : 1 day |
string | $path | default : / the cookie will be available within the entire domain |
boolean | $secure | Indicates that the cookie should only be transmitted over asecure HTTPS |
boolean | $httpOnly | When true the cookie will be made accessible only through the HTTPprotocol |
- Returns
- boolean
Definition at line 36 of file UCookie.php.
◆ setRaw()
static setRaw |
( |
|
$name, |
|
|
|
$value, |
|
|
|
$duration = 60 * 60 * 24 , |
|
|
|
$path = '/' , |
|
|
|
$secure = false , |
|
|
|
$httpOnly = false |
|
) |
| |
|
static |
Sends a raw cookie without urlencoding the cookie value.
- Parameters
-
string | $name | the name of the cookie |
string | $value | The value of the cookie. |
int | $duration | default : 1 day |
string | $path | default : / the cookie will be available within the entire domain |
boolean | $secure | Indicates that the cookie should only be transmitted over a secure HTTPS |
boolean | $httpOnly | When true the cookie will be made accessible only through the HTTP protocol |
- Returns
- boolean
- Since
- Ubiquity 2.0.11
Definition at line 103 of file UCookie.php.
◆ setTransformer()
◆ $transformer
◆ $useTransformer
The documentation for this class was generated from the following file:
- C:/Users/myadd/Documents/GitHub/ubiquity-doc-api/vendor/phpmv/ubiquity/src/Ubiquity/utils/http/UCookie.php