Namespace | tinymce.util |
Class | Cookie |
Type | Singleton |
This class contains simple cookie manangement functions.
Example
Public Methods
Method | Defined 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
Param | Detail |
---|---|
n:String | Name 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
Param | Detail |
---|---|
n:String | String 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
Param | Detail |
---|---|
name:String | Cookie name to remove/delete. |
path:Strong | Optional path to remove the cookie from. |
domain:Strong | Optional 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
Param | Detail |
---|---|
n:String | Name of the cookie. |
v:String | Raw cookie data. |
e:Date | Optional date object for the expiration of the cookie. |
p:String | Optional path to restrict the cookie to. |
d:String | Optional domain to restrict the cookie to. |
s:String | Is 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
Param | Detail |
---|---|
n:String | Name of the cookie. |
v:Object | Hashtable object to set as cookie. |
e:Date | Optional date object for the expiration of the cookie. |
p:String | Optional path to restrict the cookie to. |
d:String | Optional domain to restrict the cookie to. |
s:String | Is the cookie secure or not. |
Was this article helpful? Yes - No
Well, that's awkward . Would you mind opening an issue or helping us out?
Thanks for the feedback!
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.