Arta.Cookie

Arta.Cookie object. Contains functions to manipulate cookies in javaScript.
Source
arta.js

Static Methods

get

string Arta.Cookie.get(string key)

Get a cookie.

Arguments

    key (string)
    Arta.Cookie key

Returns

string
Arta.Cookie value

has

bool Arta.Cookie.has(string key)

Check if a cookie exists.

Arguments

    key (string)
    Arta.Cookie key

Returns

bool
true=exists

keys

list Arta.Cookie.keys()

Get the list of cookie keys.

Returns

list
List of cookie keys.

remove

void Arta.Cookie.remove(string key)

Remove a cookie

Arguments

    key (string)
    Arta.Cookie key

Returns

void

set

bool Arta.Cookie.set(string key, mixed value, int days=0, bool secure=false)

Set a cookie.

Arguments

    key (string)
    Arta.Cookie key
    value (mixed)
    Arta.Cookie value to be set
    days=0 (int)
    Expire time in days, 0=expire after browser is closed
    secure=false (bool)
    true=create a secure cookie

Returns

bool
if created or not