0 results found

tinymce.util.Cookie

Contribute to this page
Namespacetinymce.util
ClassCookie
TypeSingleton

This class contains simple cookie manangement functions.

Example

Public Methods

MethodDefined By
get(n:String):String : [static] Gets the raw data of a cookie by name.Cookie
getHash(n:String):Object : [static] Parses the specified query string into an name/value object.Cookie
remove(name:String, path:Strong, domain:Strong):void : [static] Removes/deletes a cookie by name.Cookie
set(n:String, v:String, e:Date, p:String, d:String, s:String):void : [static] Sets a raw cookie string.Cookie
setHash(n:String, v:Object, e:Date, p:String, d:String, s:String):void : [static] Sets a hashtable name/value object to a cookie.Cookie

Method details

get

public static function get(n:String):String
Gets the raw data of a cookie by name.

Parameters

ParamDetail
n:StringName of cookie to retrive.

Returns
String - Cookie data string.

getHash

public static function getHash(n:String):Object
Parses the specified query string into an name/value object.

Parameters

ParamDetail
n:StringString to parse into a n Hashtable object.

Returns
Object - Name/Value object with items parsed from querystring.

remove

public static function remove(name:String, path:Strong, domain:Strong):void
Removes/deletes a cookie by name.

Parameters

ParamDetail
name:StringCookie name to remove/delete.
path:StrongOptional path to remove the cookie from.
domain:StrongOptional domain to restrict the cookie to.

set

public static function set(n:String, v:String, e:Date, p:String, d:String, s:String):void
Sets a raw cookie string.

Parameters

ParamDetail
n:StringName of the cookie.
v:StringRaw cookie data.
e:DateOptional date object for the expiration of the cookie.
p:StringOptional path to restrict the cookie to.
d:StringOptional domain to restrict the cookie to.
s:StringIs the cookie secure or not.

setHash

public static function setHash(n:String, v:Object, e:Date, p:String, d:String, s:String):void
Sets a hashtable name/value object to a cookie.

Parameters

ParamDetail
n:StringName of the cookie.
v:ObjectHashtable object to set as cookie.
e:DateOptional date object for the expiration of the cookie.
p:StringOptional path to restrict the cookie to.
d:StringOptional domain to restrict the cookie to.
s:StringIs the cookie secure or not.

Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.