# tinymce.util.Cookie

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

### 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(name:String, path:Strong, domain:Strong):void`
Removes/deletes a cookie by name.

#### Parameters

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.

### 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.