Properties

$_content

$_content : array

Type

array — Contain cookie content in a key => value format

$_name

$_name : array

Type

array — Crypted cookie name for setcookie()

$_expire

$_expire : array

Type

array — expiration date for setcookie()

$_domain

$_domain : array

Type

array — Website domain for setcookie()

$_path

$_path : array

Type

array — Path for setcookie()

$_cipherTool

$_cipherTool : array

Type

array — cipher tool instance

$_modified

$_modified : 

Type

$_allow_writing

$_allow_writing : 

Type

$_salt

$_salt : 

Type

$_standalone

$_standalone : 

Type

$_secure

$_secure : 

Type

Methods

__construct()

__construct(  $name,   $path = '',   $expire = null,   $shared_urls = null,   $standalone = false,   $secure = false) 

Get data if the cookie exists and else initialize an new one

Parameters

$name

string Cookie name before encrypting

$path

string

$expire
$shared_urls
$standalone
$secure

disallowWriting()

disallowWriting() 

setExpire()

setExpire(integer  $expire) 

Set expiration date

Parameters

integer $expire

Expiration time from now

__get()

__get(string  $key) : string

Magic method wich return cookie data from _content array

Parameters

string $key

key wanted

Returns

string —

value corresponding to the key

__isset()

__isset(string  $key) : boolean

Magic method which check if key exists in the cookie

Parameters

string $key

key wanted

Returns

boolean —

key existence

__set()

__set(string  $key,   $value) 

Magic method wich add data into _content array

Parameters

string $key

key desired

$value

value corresponding to the key

__unset()

__unset(string  $key) 

Magic method wich delete data into _content array

Parameters

string $key

key wanted

isLogged()

isLogged(  $withGuest = false) : boolean

Check customer informations saved into cookie and return customer validity

Parameters

$withGuest

Returns

boolean —

customer validity

isLoggedBack()

isLoggedBack() : boolean

Check employee informations saved into cookie and return employee validity

Returns

boolean —

employee validity

logout()

logout() 

Delete cookie As of version 1.5 don't call this function, use Customer::logout() or Employee::logout() instead;

mylogout()

mylogout() 

Soft logout, delete everything links to the customer but leave there affiliate's informations.

As of version 1.5 don't call this function, use Customer::mylogout() instead;

makeNewLog()

makeNewLog() 

update()

update(  $nullValues = false) 

Get cookie content

Parameters

$nullValues

__destruct()

__destruct() 

write()

write() 

Save cookie with setcookie()

getFamily()

getFamily(  $origin) 

Get a family of variables (e.g. "filter_")

Parameters

$origin

unsetFamily()

unsetFamily(  $origin) 

Parameters

$origin

getAll()

getAll() 

getName()

getName() : String

Returns

String —

name of cookie

exists()

exists() : boolean

Check if the cookie exists

Returns

boolean

getDomain()

getDomain(  $shared_urls = null) 

Parameters

$shared_urls

_setcookie()

_setcookie(  $cookie = null) 

Setcookie according to php version

Parameters

$cookie