Class: tinymce.util.Cookie

# tinymce.util.Cookie

Namespace | tinymce.util
Class | Cookie
Type | Singleton

This class contains simple cookie manangement functions.

## 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(n:String, p: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

### getmethod

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

#### Parameters

n:String | Name of cookie to retrive.

#### Returns

String - Cookie data string.

### getHashmethod

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

#### Parameters

n:String | String to parse into a n Hashtable object.

#### Returns

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

### removemethod

`public static function remove(n:String, p:Strong):void`
Removes/deletes a cookie by name.

#### Parameters

n:String | Cookie name to remove/delete.
p:Strong | Optional path to remove the cookie from.

### setmethod

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

#### Parameters

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.

### setHashmethod

`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

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.