dolibarr  7.0.0-beta
Public Member Functions | Private Member Functions | List of all members
DolCookie Class Reference

Class to manage cookies. More...

Public Member Functions

 __construct ($key= '')
 Constructor. More...
 
 setCookie ($cookie, $value, $expire=0, $path="/", $domain="", $secure=0)
 Set and create the cookie. More...
 
 getCookie ($cookie)
 Get the cookie. More...
 

Private Member Functions

 _cryptCookie ()
 Encrypt en create the cookie. More...
 
 _decryptCookie ()
 Decrypt the cookie. More...
 

Detailed Description

Class to manage cookies.

This class is used by external module multicompany but will be removed soon only and must not be used by

Deprecated:
PHP already provide function to read/store a cookie. No need to use a dedicated class. Also storing sensitive information into cookie is forbidden, so encryption is useless. If a data is sensitive, it must be stored into database (if we need a long term retention) or into session.

Definition at line 32 of file cookie.class.php.

Constructor & Destructor Documentation

DolCookie::__construct (   $key = '')

Constructor.

Parameters
string$keyPersonnal key
Deprecated:

Definition at line 51 of file cookie.class.php.

Member Function Documentation

DolCookie::_cryptCookie ( )
private

Encrypt en create the cookie.

Returns
void

Definition at line 66 of file cookie.class.php.

Referenced by setCookie().

DolCookie::_decryptCookie ( )
private

Decrypt the cookie.

Returns
string

Definition at line 86 of file cookie.class.php.

Referenced by getCookie().

DolCookie::getCookie (   $cookie)

Get the cookie.

Parameters
string$cookieCookie name
Returns
string Decrypted value

Definition at line 132 of file cookie.class.php.

References _decryptCookie().

DolCookie::setCookie (   $cookie,
  $value,
  $expire = 0,
  $path = "/",
  $domain = "",
  $secure = 0 
)

Set and create the cookie.

Parameters
string$cookieCookie name
string$valueCookie value
integer$expireExpiration
string$pathPath of cookie
string$domainDomain name
int$secure0 or 1
Returns
void

Definition at line 112 of file cookie.class.php.

References _cryptCookie().


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