Skip to content

Latest commit

 

History

History
614 lines (291 loc) · 10.8 KB

class.CookieCore.md

File metadata and controls

614 lines (291 loc) · 10.8 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

$_modified

protected mixed $_modified = false

$_name

protected array $_name

$_path

protected array $_path

$_salt

protected mixed $_salt

$_secure

protected mixed $_secure = false

$_standalone

protected mixed $_standalone

Methods

__construct

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

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

Arguments

  • $name mixed - string Cookie name before encrypting
  • $path mixed - string
  • $expire mixed
  • $shared_urls mixed
  • $standalone mixed
  • $secure mixed

__destruct

mixed CookieCore::__destruct()

__get

string CookieCore::__get(string $key)

Magic method wich return cookie data from _content array

Arguments

  • $key string - key wanted

__isset

boolean CookieCore::__isset(string $key)

Magic method which check if key exists in the cookie

Arguments

  • $key string - key wanted

__set

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

Magic method wich add data into _content array

Arguments

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

__unset

mixed CookieCore::__unset(string $key)

Magic method wich delete data into _content array

Arguments

  • $key string - 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

getAll

mixed CookieCore::getAll()

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()