Skip to content

Latest commit

 

History

History
580 lines (275 loc) · 10.1 KB

class.CookieCore.md

File metadata and controls

580 lines (275 loc) · 10.1 KB

Class CookieCore

Contents

Properties

Methods

Properties

$_allow_writing

protected mixed $_allow_writing

$_cipherTool

protected array $_cipherTool

$_content

protected array $_content

$_domain

protected array $_domain

$_expire

protected array $_expire

$_iv

protected array $_iv

$_key

protected array $_key

$_modified

protected mixed $_modified = false

$_name

protected array $_name

$_path

protected array $_path

Methods

__construct

mixed CookieCore::__construct($name, $path, $expire, $shared_urls)

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

Arguments

  • $name mixed - Cookie name before encrypting
  • $path mixed
  • $expire mixed
  • $shared_urls mixed

__destruct

mixed CookieCore::__destruct()

__get

string CookieCore::__get($key)

Magic method wich return cookie data from _content array

Arguments

  • $key mixed - key wanted

__isset

boolean CookieCore::__isset($key)

Magic method which check if key exists in the cookie

Arguments

  • $key mixed - key wanted

__set

mixed CookieCore::__set($key, $value)

Magic method wich add data into _content array

Arguments

  • $key mixed - key desired
  • $value mixed - value corresponding to the key

__unset

mixed CookieCore::__unset($key)

Magic method wich delete data into _content array

Arguments

  • $key mixed - key wanted

_setcookie

mixed CookieCore::_setcookie($cookie)

Setcookie according to php version

Arguments

  • $cookie mixed

disallowWriting

mixed CookieCore::disallowWriting()

exists

boolean CookieCore::exists()

Check if the cookie exists

getDomain

mixed CookieCore::getDomain($shared_urls)

Arguments

  • $shared_urls mixed

getFamily

mixed CookieCore::getFamily($origin)

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

Arguments

  • $origin mixed

getName

String CookieCore::getName()

isLogged

boolean CookieCore::isLogged($withGuest)

Check customer informations saved into cookie and return customer validity

Arguments

  • $withGuest mixed

isLoggedBack

boolean CookieCore::isLoggedBack()

Check employee informations saved into cookie and return employee validity

logout

mixed CookieCore::logout()

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

makeNewLog

mixed CookieCore::makeNewLog()

mylogout

mixed CookieCore::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;

setExpire

mixed CookieCore::setExpire(integer $expire)

Set expiration date

Arguments

  • $expire integer - Expiration time from now

unsetFamily

mixed CookieCore::unsetFamily($origin)

Arguments

  • $origin mixed

update

mixed CookieCore::update($nullValues)

Get cookie content

Arguments

  • $nullValues mixed

write

mixed CookieCore::write()

Save cookie with setcookie()