Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git] / docs / output / Ext.util.Cookies.js
1 Ext.data.JsonP.Ext_util_Cookies({
2   "allMixins": [
3
4   ],
5   "deprecated": null,
6   "docauthor": null,
7   "members": {
8     "cfg": [
9
10     ],
11     "method": [
12       {
13         "deprecated": null,
14         "alias": null,
15         "protected": false,
16         "tagname": "method",
17         "href": "Base3.html#Ext-Base-method-addStatics",
18         "shortDoc": "Add / override static properties of this class. ...",
19         "static": true,
20         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
21         "private": false,
22         "params": [
23           {
24             "type": "Object",
25             "optional": false,
26             "doc": "\n",
27             "name": "members"
28           }
29         ],
30         "name": "addStatics",
31         "owner": "Ext.Base",
32         "doc": "<p>Add / override static properties of this class.</p>\n\n<pre><code>Ext.define('My.cool.Class', {\n    ...\n});\n\nMy.cool.Class.addStatics({\n    someProperty: 'someValue',      // My.cool.Class.someProperty = 'someValue'\n    method1: function() { ... },    // My.cool.Class.method1 = function() { ... };\n    method2: function() { ... }     // My.cool.Class.method2 = function() { ... };\n});\n</code></pre>\n",
33         "linenr": 388,
34         "return": {
35           "type": "Ext.Base",
36           "doc": "<p>this</p>\n"
37         },
38         "html_filename": "Base3.html"
39       },
40       {
41         "deprecated": null,
42         "alias": null,
43         "protected": false,
44         "tagname": "method",
45         "href": "Base3.html#Ext-Base-method-callOverridden",
46         "shortDoc": "Call the original method that was previously overridden with Ext.Base.override\n\nExt.define('My.Cat', {\n    constructo...",
47         "static": false,
48         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
49         "private": false,
50         "params": [
51           {
52             "type": "Array/Arguments",
53             "optional": false,
54             "doc": "<p>The arguments, either an array or the <code>arguments</code> object</p>\n",
55             "name": "args"
56           }
57         ],
58         "name": "callOverridden",
59         "owner": "Ext.Base",
60         "doc": "<p>Call the original method that was previously overridden with <a href=\"#/api/Ext.Base-method-override\" rel=\"Ext.Base-method-override\" class=\"docClass\">Ext.Base.override</a></p>\n\n<pre><code>Ext.define('My.Cat', {\n    constructor: function() {\n        alert(\"I'm a cat!\");\n\n        return this;\n    }\n});\n\nMy.Cat.override({\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        var instance = this.callOverridden();\n\n        alert(\"Meeeeoooowwww\");\n\n        return instance;\n    }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n                          // alerts \"I'm a cat!\"\n                          // alerts \"Meeeeoooowwww\"\n</code></pre>\n",
61         "linenr": 269,
62         "return": {
63           "type": "Mixed",
64           "doc": "<p>Returns the result after calling the overridden method</p>\n"
65         },
66         "html_filename": "Base3.html"
67       },
68       {
69         "deprecated": null,
70         "alias": null,
71         "protected": true,
72         "tagname": "method",
73         "href": "Base3.html#Ext-Base-method-callParent",
74         "shortDoc": "Call the parent's overridden method. ...",
75         "static": false,
76         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
77         "private": false,
78         "params": [
79           {
80             "type": "Array/Arguments",
81             "optional": false,
82             "doc": "<p>The arguments, either an array or the <code>arguments</code> object\nfrom the current method, for example: <code>this.callParent(arguments)</code></p>\n",
83             "name": "args"
84           }
85         ],
86         "name": "callParent",
87         "owner": "Ext.Base",
88         "doc": "<p>Call the parent's overridden method. For example:</p>\n\n<pre><code>Ext.define('My.own.A', {\n    constructor: function(test) {\n        alert(test);\n    }\n});\n\nExt.define('My.own.B', {\n    extend: 'My.own.A',\n\n    constructor: function(test) {\n        alert(test);\n\n        this.callParent([test + 1]);\n    }\n});\n\nExt.define('My.own.C', {\n    extend: 'My.own.B',\n\n    constructor: function() {\n        alert(\"Going to call parent's overriden constructor...\");\n\n        this.callParent(arguments);\n    }\n});\n\nvar a = new My.own.A(1); // alerts '1'\nvar b = new My.own.B(1); // alerts '1', then alerts '2'\nvar c = new My.own.C(2); // alerts \"Going to call parent's overriden constructor...\"\n                         // alerts '2', then alerts '3'\n</code></pre>\n",
89         "linenr": 124,
90         "return": {
91           "type": "Mixed",
92           "doc": "<p>Returns the result from the superclass' method</p>\n"
93         },
94         "html_filename": "Base3.html"
95       },
96       {
97         "deprecated": null,
98         "alias": null,
99         "protected": false,
100         "tagname": "method",
101         "href": "Cookies.html#Ext-util-Cookies-method-clear",
102         "shortDoc": "Removes a cookie with the provided name from the browser\nif found by setting its expiration date to sometime in the p...",
103         "static": false,
104         "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/Cookies.js",
105         "private": false,
106         "params": [
107           {
108             "type": "String",
109             "optional": false,
110             "doc": "<p>The name of the cookie to remove</p>\n",
111             "name": "name"
112           },
113           {
114             "type": "String",
115             "optional": true,
116             "doc": "<p>(optional) The path for the cookie. This must be included if you included a path while setting the cookie.</p>\n",
117             "name": "path"
118           }
119         ],
120         "name": "clear",
121         "owner": "Ext.util.Cookies",
122         "doc": "<p>Removes a cookie with the provided name from the browser\nif found by setting its expiration date to sometime in the past.</p>\n",
123         "linenr": 80,
124         "return": {
125           "type": "void",
126           "doc": "\n"
127         },
128         "html_filename": "Cookies.html"
129       },
130       {
131         "deprecated": null,
132         "alias": null,
133         "protected": false,
134         "tagname": "method",
135         "href": "Base3.html#Ext-Base-method-create",
136         "shortDoc": "Create a new instance of this Class. ...",
137         "static": true,
138         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
139         "private": false,
140         "params": [
141
142         ],
143         "name": "create",
144         "owner": "Ext.Base",
145         "doc": "<p>Create a new instance of this Class.</p>\n\n<pre><code>Ext.define('My.cool.Class', {\n    ...\n});\n\nMy.cool.Class.create({\n    someConfig: true\n});\n</code></pre>\n\n<p>All parameters are passed to the constructor of the class.</p>\n",
146         "linenr": 329,
147         "return": {
148           "type": "Object",
149           "doc": "<p>the created instance.</p>\n"
150         },
151         "html_filename": "Base3.html"
152       },
153       {
154         "deprecated": null,
155         "alias": null,
156         "protected": false,
157         "tagname": "method",
158         "href": "Base3.html#Ext-Base-method-createAlias",
159         "shortDoc": "Create aliases for existing prototype methods. ...",
160         "static": true,
161         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
162         "private": false,
163         "params": [
164           {
165             "type": "String/Object",
166             "optional": false,
167             "doc": "<p>The new method name, or an object to set multiple aliases. See\n<a href=\"#/api/Ext.Function-method-flexSetter\" rel=\"Ext.Function-method-flexSetter\" class=\"docClass\">flexSetter</a></p>\n",
168             "name": "alias"
169           },
170           {
171             "type": "String/Object",
172             "optional": false,
173             "doc": "<p>The original method name</p>\n",
174             "name": "origin"
175           }
176         ],
177         "name": "createAlias",
178         "owner": "Ext.Base",
179         "doc": "<p>Create aliases for existing prototype methods. Example:</p>\n\n<pre><code>Ext.define('My.cool.Class', {\n    method1: function() { ... },\n    method2: function() { ... }\n});\n\nvar test = new My.cool.Class();\n\nMy.cool.Class.createAlias({\n    method3: 'method1',\n    method4: 'method2'\n});\n\ntest.method3(); // test.method1()\n\nMy.cool.Class.createAlias('method5', 'method3');\n\ntest.method5(); // test.method3() -&gt; test.method1()\n</code></pre>\n",
180         "linenr": 648,
181         "return": {
182           "type": "void",
183           "doc": "\n"
184         },
185         "html_filename": "Base3.html"
186       },
187       {
188         "deprecated": null,
189         "alias": null,
190         "protected": false,
191         "tagname": "method",
192         "href": "Cookies.html#Ext-util-Cookies-method-get",
193         "shortDoc": "Retrieves cookies that are accessible by the current page. ...",
194         "static": false,
195         "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/Cookies.js",
196         "private": false,
197         "params": [
198           {
199             "type": "String",
200             "optional": false,
201             "doc": "<p>The name of the cookie to get</p>\n",
202             "name": "name"
203           }
204         ],
205         "name": "get",
206         "owner": "Ext.util.Cookies",
207         "doc": "<p>Retrieves cookies that are accessible by the current page. If a cookie\ndoes not exist, <code>get()</code> returns <tt>null</tt>.  The following\nexample retrieves the cookie called \"valid\" and stores the String value\nin the variable <tt>validStatus</tt>.</p>\n\n<pre><code>var validStatus = Ext.util.Cookies.get(\"valid\");\n</code></pre>\n\n",
208         "linenr": 48,
209         "return": {
210           "type": "Mixed",
211           "doc": "<p>Returns the cookie value for the specified name;\nnull if the cookie name does not exist.</p>\n"
212         },
213         "html_filename": "Cookies.html"
214       },
215       {
216         "deprecated": null,
217         "alias": null,
218         "protected": false,
219         "tagname": "method",
220         "href": "Base3.html#Ext-Base-method-getName",
221         "shortDoc": "Get the current class' name in string format. ...",
222         "static": false,
223         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
224         "private": false,
225         "params": [
226
227         ],
228         "name": "getName",
229         "owner": "Ext.Base",
230         "doc": "<p>Get the current class' name in string format.</p>\n\n<pre><code>Ext.define('My.cool.Class', {\n    constructor: function() {\n        alert(this.self.getName()); // alerts 'My.cool.Class'\n    }\n});\n\nMy.cool.Class.getName(); // 'My.cool.Class'\n</code></pre>\n",
231         "linenr": 631,
232         "return": {
233           "type": "String",
234           "doc": "<p>className</p>\n"
235         },
236         "html_filename": "Base3.html"
237       },
238       {
239         "deprecated": null,
240         "alias": null,
241         "protected": false,
242         "tagname": "method",
243         "href": "Base3.html#Ext-Base-method-implement",
244         "shortDoc": "Add methods / properties to the prototype of this class. ...",
245         "static": true,
246         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
247         "private": false,
248         "params": [
249           {
250             "type": "Object",
251             "optional": false,
252             "doc": "\n",
253             "name": "members"
254           }
255         ],
256         "name": "implement",
257         "owner": "Ext.Base",
258         "doc": "<p>Add methods / properties to the prototype of this class.</p>\n\n<pre><code>Ext.define('My.awesome.Cat', {\n    constructor: function() {\n        ...\n    }\n});\n\n My.awesome.Cat.implement({\n     meow: function() {\n        alert('Meowww...');\n     }\n });\n\n var kitty = new My.awesome.Cat;\n kitty.meow();\n</code></pre>\n",
259         "linenr": 415,
260         "return": {
261           "type": "void",
262           "doc": "\n"
263         },
264         "html_filename": "Base3.html"
265       },
266       {
267         "deprecated": null,
268         "alias": null,
269         "protected": true,
270         "tagname": "method",
271         "href": "Base3.html#Ext-Base-method-initConfig",
272         "shortDoc": "Initialize configuration for this class. ...",
273         "static": false,
274         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
275         "private": false,
276         "params": [
277           {
278             "type": "Object",
279             "optional": false,
280             "doc": "\n",
281             "name": "config"
282           }
283         ],
284         "name": "initConfig",
285         "owner": "Ext.Base",
286         "doc": "<p>Initialize configuration for this class. a typical example:</p>\n\n<pre><code>Ext.define('My.awesome.Class', {\n    // The default config\n    config: {\n        name: 'Awesome',\n        isAwesome: true\n    },\n\n    constructor: function(config) {\n        this.initConfig(config);\n\n        return this;\n    }\n});\n\nvar awesome = new My.awesome.Class({\n    name: 'Super Awesome'\n});\n\nalert(awesome.getName()); // 'Super Awesome'\n</code></pre>\n",
287         "linenr": 63,
288         "return": {
289           "type": "Object",
290           "doc": "<p>mixins The mixin prototypes as key - value pairs</p>\n"
291         },
292         "html_filename": "Base3.html"
293       },
294       {
295         "deprecated": null,
296         "alias": null,
297         "protected": false,
298         "tagname": "method",
299         "href": "Base3.html#Ext-Base-method-override",
300         "shortDoc": "Override prototype members of this class. ...",
301         "static": true,
302         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
303         "private": false,
304         "params": [
305           {
306             "type": "Object",
307             "optional": false,
308             "doc": "\n",
309             "name": "members"
310           }
311         ],
312         "name": "override",
313         "owner": "Ext.Base",
314         "doc": "<p>Override prototype members of this class. Overridden methods can be invoked via\n<a href=\"#/api/Ext.Base-method-callOverridden\" rel=\"Ext.Base-method-callOverridden\" class=\"docClass\">Ext.Base.callOverridden</a></p>\n\n<pre><code>Ext.define('My.Cat', {\n    constructor: function() {\n        alert(\"I'm a cat!\");\n\n        return this;\n    }\n});\n\nMy.Cat.override({\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        var instance = this.callOverridden();\n\n        alert(\"Meeeeoooowwww\");\n\n        return instance;\n    }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n                          // alerts \"I'm a cat!\"\n                          // alerts \"Meeeeoooowwww\"\n</code></pre>\n",
315         "linenr": 518,
316         "return": {
317           "type": "Ext.Base",
318           "doc": "<p>this</p>\n"
319         },
320         "html_filename": "Base3.html"
321       },
322       {
323         "deprecated": null,
324         "alias": null,
325         "protected": false,
326         "tagname": "method",
327         "href": "Cookies.html#Ext-util-Cookies-method-set",
328         "shortDoc": "Create a cookie with the specified name and value. ...",
329         "static": false,
330         "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/Cookies.js",
331         "private": false,
332         "params": [
333           {
334             "type": "String",
335             "optional": false,
336             "doc": "<p>The name of the cookie to set.</p>\n",
337             "name": "name"
338           },
339           {
340             "type": "Mixed",
341             "optional": false,
342             "doc": "<p>The value to set for the cookie.</p>\n",
343             "name": "value"
344           },
345           {
346             "type": "Object",
347             "optional": false,
348             "doc": "<p>(Optional) Specify an expiration date the\ncookie is to persist until.  Note that the specified Date object will\nbe converted to Greenwich Mean Time (GMT).</p>\n",
349             "name": "expires"
350           },
351           {
352             "type": "String",
353             "optional": false,
354             "doc": "<p>(Optional) Setting a path on the cookie restricts\naccess to pages that match that path. Defaults to all pages (<tt>'/'</tt>).</p>\n",
355             "name": "path"
356           },
357           {
358             "type": "String",
359             "optional": false,
360             "doc": "<p>(Optional) Setting a domain restricts access to\npages on a given domain (typically used to allow cookie access across\nsubdomains). For example, \"sencha.com\" will create a cookie that can be\naccessed from any subdomain of sencha.com, including www.sencha.com,\nsupport.sencha.com, etc.</p>\n",
361             "name": "domain"
362           },
363           {
364             "type": "Boolean",
365             "optional": false,
366             "doc": "<p>(Optional) Specify true to indicate that the cookie\nshould only be accessible via SSL on a page using the HTTPS protocol.\nDefaults to <tt>false</tt>. Note that this will only work if the page\ncalling this code uses the HTTPS protocol, otherwise the cookie will be\ncreated with default options.</p>\n",
367             "name": "secure"
368           }
369         ],
370         "name": "set",
371         "owner": "Ext.util.Cookies",
372         "doc": "<p>Create a cookie with the specified name and value. Additional settings\nfor the cookie may be optionally specified (for example: expiration,\naccess restriction, SSL).</p>\n",
373         "linenr": 15,
374         "return": {
375           "type": "void",
376           "doc": "\n"
377         },
378         "html_filename": "Cookies.html"
379       },
380       {
381         "deprecated": null,
382         "alias": null,
383         "protected": true,
384         "tagname": "method",
385         "href": "Base3.html#Ext-Base-method-statics",
386         "shortDoc": "Get the reference to the class from which this object was instantiated. ...",
387         "static": false,
388         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
389         "private": false,
390         "params": [
391
392         ],
393         "name": "statics",
394         "owner": "Ext.Base",
395         "doc": "<p>Get the reference to the class from which this object was instantiated. Note that unlike <a href=\"#/api/Ext.Base-property-self\" rel=\"Ext.Base-property-self\" class=\"docClass\">Ext.Base.self</a>,\n<code>this.statics()</code> is scope-independent and it always returns the class from which it was called, regardless of what\n<code>this</code> points to during run-time</p>\n\n<pre><code>Ext.define('My.Cat', {\n    statics: {\n        totalCreated: 0,\n        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n    },\n\n    constructor: function() {\n        var statics = this.statics();\n\n        alert(statics.speciesName);     // always equals to 'Cat' no matter what 'this' refers to\n                                        // equivalent to: My.Cat.speciesName\n\n        alert(this.self.speciesName);   // dependent on 'this'\n\n        statics.totalCreated++;\n\n        return this;\n    },\n\n    clone: function() {\n        var cloned = new this.self;                      // dependent on 'this'\n\n        cloned.groupName = this.statics().speciesName;   // equivalent to: My.Cat.speciesName\n\n        return cloned;\n    }\n});\n\n\nExt.define('My.SnowLeopard', {\n    extend: 'My.Cat',\n\n    statics: {\n        speciesName: 'Snow Leopard'     // My.SnowLeopard.speciesName = 'Snow Leopard'\n    },\n\n    constructor: function() {\n        this.callParent();\n    }\n});\n\nvar cat = new My.Cat();                 // alerts 'Cat', then alerts 'Cat'\n\nvar snowLeopard = new My.SnowLeopard(); // alerts 'Cat', then alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone));         // alerts 'My.SnowLeopard'\nalert(clone.groupName);                 // alerts 'Cat'\n\nalert(My.Cat.totalCreated);             // alerts 3\n</code></pre>\n",
396         "linenr": 199,
397         "return": {
398           "type": "Class",
399           "doc": "\n"
400         },
401         "html_filename": "Base3.html"
402       }
403     ],
404     "property": [
405       {
406         "type": "Class",
407         "deprecated": null,
408         "alias": null,
409         "protected": true,
410         "tagname": "property",
411         "href": "Base3.html#Ext-Base-property-self",
412         "shortDoc": "Get the reference to the current class from which this object was instantiated. ...",
413         "static": false,
414         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
415         "private": false,
416         "name": "self",
417         "owner": "Ext.Base",
418         "doc": "<p>Get the reference to the current class from which this object was instantiated. Unlike <a href=\"#/api/Ext.Base-method-statics\" rel=\"Ext.Base-method-statics\" class=\"docClass\">Ext.Base.statics</a>,\n<code>this.self</code> is scope-dependent and it's meant to be used for dynamic inheritance. See <a href=\"#/api/Ext.Base-method-statics\" rel=\"Ext.Base-method-statics\" class=\"docClass\">Ext.Base.statics</a>\nfor a detailed comparison</p>\n\n<pre><code>Ext.define('My.Cat', {\n    statics: {\n        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n    },\n\n    constructor: function() {\n        alert(this.self.speciesName); / dependent on 'this'\n\n        return this;\n    },\n\n    clone: function() {\n        return new this.self();\n    }\n});\n\n\nExt.define('My.SnowLeopard', {\n    extend: 'My.Cat',\n    statics: {\n        speciesName: 'Snow Leopard'         // My.SnowLeopard.speciesName = 'Snow Leopard'\n    }\n});\n\nvar cat = new My.Cat();                     // alerts 'Cat'\nvar snowLeopard = new My.SnowLeopard();     // alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone));             // alerts 'My.SnowLeopard'\n</code></pre>\n",
419         "linenr": 18,
420         "html_filename": "Base3.html"
421       }
422     ],
423     "cssVar": [
424
425     ],
426     "cssMixin": [
427
428     ],
429     "event": [
430
431     ]
432   },
433   "singleton": true,
434   "alias": null,
435   "superclasses": [
436     "Ext.Base"
437   ],
438   "protected": false,
439   "tagname": "class",
440   "mixins": [
441
442   ],
443   "href": "Cookies.html#Ext-util-Cookies",
444   "subclasses": [
445
446   ],
447   "static": false,
448   "author": null,
449   "component": false,
450   "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/Cookies.js",
451   "private": false,
452   "alternateClassNames": [
453
454   ],
455   "name": "Ext.util.Cookies",
456   "doc": "<p>Utility class for setting/reading values from browser cookies.\nValues can be written using the <a href=\"#/api/Ext.util.Cookies-method-set\" rel=\"Ext.util.Cookies-method-set\" class=\"docClass\">set</a> method.\nValues can be read using the <a href=\"#/api/Ext.util.Cookies-method-get\" rel=\"Ext.util.Cookies-method-get\" class=\"docClass\">get</a> method.\nA cookie can be invalidated on the client machine using the <a href=\"#/api/Ext.util.Cookies-method-clear\" rel=\"Ext.util.Cookies-method-clear\" class=\"docClass\">clear</a> method.</p>\n",
457   "mixedInto": [
458
459   ],
460   "linenr": 1,
461   "xtypes": [
462
463   ],
464   "html_filename": "Cookies.html",
465   "extends": "Ext.Base"
466 });