User cookie wrapper.
More...
|
| Cookie ($name, $value=null, $expire=null, $path=null, $domain=null, $secure=null, $httponly=null) |
|
| save () |
|
| delete () |
|
User cookie wrapper.
- Version
- 1.2
- Author
- DinuSV
Cookie |
( |
|
$name, |
|
|
|
$value = null , |
|
|
|
$expire = null , |
|
|
|
$path = null , |
|
|
|
$domain = null , |
|
|
|
$secure = null , |
|
|
|
$httponly = null |
|
) |
| |
Constructor
- Parameters
-
string | $name | : the name of the cookie |
string | $value | [optional] : value of the cookie |
integer | $expire | [optional] : time the cookie will expire |
string | $path | [optional] : the path the server in which the cookie will be available on |
string | $domain | [optional] : the domain the cookie is available to |
boolean | $secure | [optional] : transmit the cookie through a secure https connection |
boolean | $httponly | [optional] : make the cookie accessible only through the HTTP protocol |
Set the cookie with the setcookie function
- Returns
- boolean : false if output exists prior to calling this function, true if the cookie has been saved
Unset the cookie by calling the setcookie function
- Returns
- boolean : false if output exists prior to calling this function, true if the cookie has been saved
string : Name of the cookie
string : Value of the cookie
int : Time the cookie expires in ( UNIX timestamp )
string : The path on the server in which the cookie will be available on. Set to '/' to make it available through the entire domain.
string : The domain that the cookie will be available to.
bool : Transmit the cookie only if the connection is a secure HTTPS connection from the client. When set to true, the cookie will be set only if a secure connection exists.
bool : The cookie will only be made accessible through the HTTP protocol. The cookie cannot be accessed through scripting languages, like javascript.