Ubiquity  2.0.0
php rapid development framework
Cookie Class Reference

Cookies utilities. More...

Public Member Functions

 deleteAll ($path="/")
 Deletes all cookies. More...
 

Static Public Member Functions

static set ($name, $value, $duration=60 *60 *24, $path="/")
 Sends a cookie. More...
 
static get ($name, $default=null)
 Returns the Cookie with the name $name. More...
 
static delete ($name, $path="/")
 Removes the cookie with the name $name. More...
 

Detailed Description

Cookies utilities.

Author
jc
Version
1.0.0.2

Definition at line 10 of file Cookie.php.

Member Function Documentation

◆ delete()

static delete (   $name,
  $path = "/" 
)
static

Removes the cookie with the name $name.

Parameters
string$name
$path

Definition at line 38 of file Cookie.php.

◆ deleteAll()

deleteAll (   $path = "/")

Deletes all cookies.

Definition at line 45 of file Cookie.php.

◆ get()

static get (   $name,
  $default = null 
)
static

Returns the Cookie with the name $name.

Parameters
string$name
string$default
Returns
null|string

Definition at line 29 of file Cookie.php.

◆ set()

static set (   $name,
  $value,
  $duration = 60*60*24,
  $path = "/" 
)
static

Sends a cookie.

Parameters
string$namethe name of the cookie
string$valueThe value of the cookie.
int$durationdefault : 1 day
string$pathdefault : / the cookie will be available within the entire domain

Definition at line 19 of file Cookie.php.


The documentation for this class was generated from the following file: