class Cookie

Constants

FLATNESS_ARRAY

Transform array values as flatten string (serialize like)

INDEXED_COOKIES_ARRAY

Transform array values as array cookies, named like cookie_name[array_index]

Methods

__construct( string $cookie_name = null, string|array $cookie_value = null, int $flag = self::FLATNESS_ARRAY)

No description

setFlag( int $flag)

No description

int
getFlag()

No description

setName( string $name)

No description

string
getName()

No description

setValue( string $value)

No description

string
getValue()

No description

string
getSafeValue()

No description

setExpire( int $expire)

No description

int
getExpire()

No description

int
getSafeExpire()

No description

setPath( string $path)

No description

string
getPath()

No description

string
getSafePath()

No description

setDomain( string $domain)

No description

string
getDomain()

No description

string
getSafeDomain()

No description

setSecure( string $secure)

No description

bool
getSecure()

No description

bool
getSafeSecure()

No description

setHttponly( string $https)

No description

bool
getHttponly()

No description

bool
getSafeHttponly()

No description

sendAsRaw()

No description

sendAsEncoded()

No description

setCookieFuncArguments( array $args)

No description

array
getCookieFuncArguments( bool $organize = true)

No description

mixed
getCookieFuncArgument( string $var)

No description

addCookieFuncArgument( string $var, mixed $val)

No description

clearCookieFuncArgument( string $var)

No description

bool
exists( string $cookie_name = null)

Test if a cookie exists

string|array
read( string $cookie_name = null)

Get a cookie value

bool
send( string $cookie_name = null, string|array $cookie_value = null)

Set a cookie value

bool
addInCookie( string $variable_name, string $variable_value, string $cookie_name = null)

Add a variable value in a cookie

bool
clear( string $cookie_name = null)

Clear a cookie

Details

at line 106
__construct( string $cookie_name = null, string|array $cookie_value = null, int $flag = self::FLATNESS_ARRAY)

Parameters

string $cookie_name
string|array $cookie_value
int $flag

at line 127
Cookie setFlag( int $flag)

Parameters

int $flag

Return Value

Cookie

at line 136
int getFlag()

Return Value

int

at line 145
Cookie setName( string $name)

Parameters

string $name

Return Value

Cookie

at line 154
string getName()

Return Value

string

at line 163
Cookie setValue( string $value)

Parameters

string $value

Return Value

Cookie

at line 172
string getValue()

Return Value

string

at line 180
string getSafeValue()

Return Value

string

at line 189
Cookie setExpire( int $expire)

Parameters

int $expire

Return Value

Cookie

at line 198
int getExpire()

Return Value

int

at line 206
int getSafeExpire()

Return Value

int

at line 215
Cookie setPath( string $path)

Parameters

string $path

Return Value

Cookie

at line 224
string getPath()

Return Value

string

at line 232
string getSafePath()

Return Value

string

at line 241
Cookie setDomain( string $domain)

Parameters

string $domain

Return Value

Cookie

at line 250
string getDomain()

Return Value

string

at line 258
string getSafeDomain()

Return Value

string

at line 267
Cookie setSecure( string $secure)

Parameters

string $secure

Return Value

Cookie

at line 276
bool getSecure()

Return Value

bool

at line 284
bool getSafeSecure()

Return Value

bool

at line 293
Cookie setHttponly( string $https)

Parameters

string $https

Return Value

Cookie

at line 302
bool getHttponly()

Return Value

bool

at line 310
bool getSafeHttponly()

Return Value

bool

at line 318
Cookie sendAsRaw()

Return Value

Cookie

at line 327
Cookie sendAsEncoded()

Return Value

Cookie

at line 337
Cookie setCookieFuncArguments( array $args)

Parameters

array $args

Return Value

Cookie

at line 347
array getCookieFuncArguments( bool $organize = true)

Parameters

bool $organize

Return Value

array

at line 359
mixed getCookieFuncArgument( string $var)

Parameters

string $var

Return Value

mixed

at line 369
Cookie addCookieFuncArgument( string $var, mixed $val)

Parameters

string $var
mixed $val

Return Value

Cookie

at line 379
Cookie clearCookieFuncArgument( string $var)

Parameters

string $var

Return Value

Cookie

at line 442
bool exists( string $cookie_name = null)

Test if a cookie exists

Parameters

string $cookie_name

Return Value

bool

at line 456
string|array read( string $cookie_name = null)

Get a cookie value

Parameters

string $cookie_name

Return Value

string|array

at line 479
bool send( string $cookie_name = null, string|array $cookie_value = null)

Set a cookie value

Parameters

string $cookie_name
string|array $cookie_value

Return Value

bool

at line 510
bool addInCookie( string $variable_name, string $variable_value, string $cookie_name = null)

Add a variable value in a cookie

Parameters

string $variable_name
string $variable_value
string $cookie_name

Return Value

bool

at line 529
bool clear( string $cookie_name = null)

Clear a cookie

Parameters

string $cookie_name

Return Value

bool