Cookie Class Reference
[Lib]
Wraps Cookie Handling. More...
Static Public Member Functions |
|
static | create ($name, $content, $valid_seconds=null, $path= '/', $http_only=true, $domain=false, $ssl=false) |
Create Cookie. |
|
static | delete ($name) |
Delete cookie. |
|
static | exists ($name) |
Returns true if cookie exists, false
otherwise. |
|
static | get_cookie_value ($name) |
Returns value form given cookie, if exists,
false otherwise. |
Detailed Description
Wraps Cookie Handling.
Definition at line 8 of file cookie.cls.php.
Member Function Documentation
static Cookie::create | ( | $ | name, | |
$ | content, | |||
$ | valid_seconds =
null , |
|||
$ | path = '/' , |
|||
$ | http_only =
true , |
|||
$ | domain = false , |
|||
$ | ssl = false |
|||
) | [static] |
Create Cookie.
- Parameters:
-
string Name of Cookie string Cotent of Cookuie int Number of seconds the cookie will be valid
Definition at line 16 of file cookie.cls.php.
00016 { 00017 $expire = empty($valid_seconds) ? null : time() + Cast::int($valid_seconds); 00018 setcookie($name, $content, $expire, $path, $domain, $ssl, $http_only); 00019 }
static Cookie::delete | ( | $ | name | ) | [static] |
Delete cookie.
- Parameters:
-
string Name of cookie to delete
Definition at line 26 of file cookie.cls.php.
static Cookie::exists | ( | $ | name | ) | [static] |
Returns true if cookie exists, false otherwise.
- Parameters:
-
string Name of cookie
Definition at line 35 of file cookie.cls.php.
static Cookie::get_cookie_value | ( | $ | name | ) | [static] |
Returns value form given cookie, if exists, false otherwise.
Definition at line 42 of file cookie.cls.php.
00042 { 00043 return Arr::get_item($_COOKIE, $name, false); 00044 }
The documentation for this class was generated from the following file:
- gyro/core/lib/helpers/cookie.cls.php