HttpSession

class HttpSession {}

Members

Aliases

forget
alias forget = remove
Undocumented in source.

Functions

all
string[string] all()

Get all of the session data.

exists
bool exists(string key)

Checks if a key exists.

flash
void flash(string key, T value)

Flash a key / value pair to the session.

flashInput
void flashInput(string[string] value)

Flash an input array to the session.

get
T get(string name, T defaultValue)
Undocumented in source. Be warned that the author may not have intended to support it.
getAttribute
T getAttribute(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
getAttributes
JSONValue getAttributes()
Undocumented in source. Be warned that the author may not have intended to support it.
getCreationTime
long getCreationTime()
Undocumented in source. Be warned that the author may not have intended to support it.
getId
string getId()
Undocumented in source. Be warned that the author may not have intended to support it.
getLastAccessedTime
long getLastAccessedTime()
Undocumented in source. Be warned that the author may not have intended to support it.
getMaxInactiveInterval
int getMaxInactiveInterval()

Get the max inactive interval. The time unit is second.

getOldInput
string[string] getOldInput(string[string] defaults)
string getOldInput(string key, string defaults)

Get the requested item from the flashed input array.

has
bool has(string key)

Checks if a key is present and not null.

hasOldInput
bool hasOldInput(string key)

Determine if the session contains old input.

isNewSession
bool isNewSession()
Undocumented in source. Be warned that the author may not have intended to support it.
isValid
bool isValid()
Undocumented in source. Be warned that the author may not have intended to support it.
keep
void keep(string[] keys)

Reflash a subset of the current flash data.

keys
string[] keys()
Undocumented in source. Be warned that the author may not have intended to support it.
mergeNewFlashes
void mergeNewFlashes(string[] keys)

Merge new flash keys into the new flash array.

now
void now(string key, T value)

Flash a key / value pair to the session for immediate use.

opEquals
bool opEquals(Object o)
Undocumented in source. Be warned that the author may not have intended to support it.
pull
void pull(string key, string value)

Get the value of a given key and then forget it.

push
void push(string key, T value)

Push a value onto a session array.

put
void put(string key, T value)
void put(string[string] pairs)

Put a key / value pair or array of key / value pairs in the session.

reflash
void reflash()

Reflash all of the session flash data.

remember
string remember(string key, string value)

Get an item from the session, or store the default value.

remove
void remove(string key)
Undocumented in source. Be warned that the author may not have intended to support it.
remove
void remove(string[] keys)
Undocumented in source. Be warned that the author may not have intended to support it.
removeFromOldFlashData
void removeFromOldFlashData(string[] keys)

Remove the given keys from the old flash data.

replace
void replace(string[string] attributes)

Replace the given session attributes entirely.

save
void save()

Save the session data to storage.

set
void set(string name, T value)
Undocumented in source. Be warned that the author may not have intended to support it.
setAttribute
void setAttribute(string name, T value)
Undocumented in source. Be warned that the author may not have intended to support it.
setAttributes
void setAttributes(JSONValue attributes)
Undocumented in source. Be warned that the author may not have intended to support it.
setCreationTime
void setCreationTime(long creationTime)
Undocumented in source. Be warned that the author may not have intended to support it.
setId
void setId(string id)
Undocumented in source. Be warned that the author may not have intended to support it.
setLastAccessedTime
void setLastAccessedTime(long lastAccessedTime)
Undocumented in source. Be warned that the author may not have intended to support it.
setMaxInactiveInterval
void setMaxInactiveInterval(int maxInactiveInterval)

Set the max inactive interval. The time unit is second.

setNewSession
void setNewSession(bool newSession)
Undocumented in source. Be warned that the author may not have intended to support it.
toHash
size_t toHash()
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

create
HttpSession create(string id, int maxInactiveInterval)
Undocumented in source. Be warned that the author may not have intended to support it.
fromJson
HttpSession fromJson(string id, string json)
Undocumented in source. Be warned that the author may not have intended to support it.
generateSessionId
string generateSessionId(string sessionName)
Undocumented in source. Be warned that the author may not have intended to support it.
toJson
string toJson(HttpSession session)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta