mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 21:13:26 +00:00
1056 lines
63 KiB
HTML
1056 lines
63 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
|
<title>API: cookie YAHOO.util.Cookie (YUI Library)</title>
|
|
|
|
<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" />
|
|
<link rel="stylesheet" type="text/css" href="assets/api.css" />
|
|
|
|
<script type="text/javascript" src="assets/api-js"></script>
|
|
<script type="text/javascript" src="assets/ac-js"></script>
|
|
</head>
|
|
|
|
<body id="yahoo-com">
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
<div id="hd">
|
|
<h1><a href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library">Yahoo! UI Library</a></h1>
|
|
<h3>cookie <span class="subtitle">2.8.2r1</span></h3>
|
|
<a href="./index.html" title="Yahoo! UI Library">Yahoo! UI Library</a>
|
|
> <a href="./module_cookie.html" title="cookie">cookie</a>
|
|
> YAHOO.util.Cookie
|
|
|
|
<form onsubmit="return false">
|
|
<div id="propertysearch">
|
|
Search: <input autocomplete="off" id="searchinput" />
|
|
<div id="searchresults">
|
|
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
<form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
|
|
<fieldset>
|
|
<legend>Filters</legend>
|
|
<span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
|
|
<span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
|
|
<span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
|
|
</fieldset>
|
|
</form>
|
|
|
|
<h2>
|
|
|
|
|
|
<code>static</code>
|
|
|
|
Class <b property="yui:name">YAHOO.util.Cookie</b>
|
|
<span class="extends">
|
|
</span>
|
|
|
|
</h2>
|
|
<!-- class tree goes here -->
|
|
|
|
|
|
|
|
|
|
<div class="summary description" property="yui:description">
|
|
Cookie utility.
|
|
</div>
|
|
|
|
|
|
<div rel="yui:properties" resource="#properties">
|
|
|
|
</div>
|
|
|
|
<div rel="yui:methods" resource="#methods">
|
|
<div class="section method details">
|
|
<h3 id="methods">Methods</h3>
|
|
<div class="content">
|
|
<div class="private" rel="yui:method" resource="#method__createCookieHashString">
|
|
<h4>
|
|
<a name="method__createCookieHashString">_createCookieHashString</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
private
|
|
static
|
|
|
|
String
|
|
<strong property="yui:name">_createCookieHashString</strong>
|
|
(
|
|
|
|
|
|
hash
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Formats a cookie value for an object containing multiple values.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">hash</span>
|
|
<<span property="yui:type">Object</span>>
|
|
</code>
|
|
<span property="yui:description"> An object of key-value pairs to create a string for.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code property="yui:return">
|
|
String
|
|
</code></dt>
|
|
<dd property="yui:returnInfo">A string suitable for use as a cookie value.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="private" rel="yui:method" resource="#method__createCookieString">
|
|
<h4>
|
|
<a name="method__createCookieString">_createCookieString</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
private
|
|
static
|
|
|
|
String
|
|
<strong property="yui:name">_createCookieString</strong>
|
|
(
|
|
|
|
|
|
name
|
|
|
|
|
|
,
|
|
value
|
|
|
|
|
|
,
|
|
encodeValue
|
|
|
|
|
|
,
|
|
options
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Creates a cookie string that can be assigned into document.cookie.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">name</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> The name of the cookie.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">value</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> The value of the cookie.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">encodeValue</span>
|
|
<<span property="yui:type">Boolean</span>>
|
|
</code>
|
|
<span property="yui:description"> True to encode the value, false to leave as-is.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">options</span>
|
|
<<span property="yui:type">Object</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) Options for the cookie.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code property="yui:return">
|
|
String
|
|
</code></dt>
|
|
<dd property="yui:returnInfo">The formatted cookie string.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="private" rel="yui:method" resource="#method__parseCookieHash">
|
|
<h4>
|
|
<a name="method__parseCookieHash">_parseCookieHash</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
private
|
|
static
|
|
|
|
Object
|
|
<strong property="yui:name">_parseCookieHash</strong>
|
|
(
|
|
|
|
|
|
text
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Parses a cookie hash string into an object.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">text</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> The cookie hash string to parse. The string should already be URL-decoded.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code property="yui:return">
|
|
Object
|
|
</code></dt>
|
|
<dd property="yui:returnInfo">An object containing entries for each cookie value.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="private" rel="yui:method" resource="#method__parseCookieString">
|
|
<h4>
|
|
<a name="method__parseCookieString">_parseCookieString</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
private
|
|
static
|
|
|
|
Object
|
|
<strong property="yui:name">_parseCookieString</strong>
|
|
(
|
|
|
|
|
|
text
|
|
|
|
|
|
,
|
|
decode
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Parses a cookie string into an object representing all accessible cookies.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">text</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> The cookie string to parse.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">decode</span>
|
|
<<span property="yui:type">Boolean</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) Indicates if the cookie values should be decoded or not. Default is true.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code property="yui:return">
|
|
Object
|
|
</code></dt>
|
|
<dd property="yui:returnInfo">An object containing entries for each accessible cookie.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_exists">
|
|
<h4>
|
|
<a name="method_exists">exists</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
Boolean
|
|
<strong property="yui:name">exists</strong>
|
|
(
|
|
|
|
|
|
name
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Determines if the cookie with the given name exists. This is useful for
|
|
Boolean cookies (those that do not follow the name=value convention).
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">name</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> The name of the cookie to check.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code property="yui:return">
|
|
Boolean
|
|
</code></dt>
|
|
<dd property="yui:returnInfo">True if the cookie exists, false if not.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_get">
|
|
<h4>
|
|
<a name="method_get">get</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
Variant
|
|
<strong property="yui:name">get</strong>
|
|
(
|
|
|
|
|
|
name
|
|
|
|
|
|
,
|
|
options
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Returns the cookie value for the given name.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">name</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> The name of the cookie to retrieve.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">options</span>
|
|
<<span property="yui:type">Object|Function</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) An object containing one or more
|
|
cookie options: raw (true/false) and converter (a function).
|
|
The converter function is run on the value before returning it. The
|
|
function is not used if the cookie doesn't exist. The function can be
|
|
passed instead of the options object for backwards compatibility.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code property="yui:return">
|
|
Variant
|
|
</code></dt>
|
|
<dd property="yui:returnInfo">If no converter is specified, returns a string or null if
|
|
the cookie doesn't exist. If the converter is specified, returns the value
|
|
returned from the converter or null if the cookie doesn't exist.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_getSub">
|
|
<h4>
|
|
<a name="method_getSub">getSub</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
Variant
|
|
<strong property="yui:name">getSub</strong>
|
|
(
|
|
|
|
|
|
name
|
|
|
|
|
|
,
|
|
subName
|
|
|
|
|
|
,
|
|
converter
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Returns the value of a subcookie.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">name</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> The name of the cookie to retrieve.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">subName</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> The name of the subcookie to retrieve.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">converter</span>
|
|
<<span property="yui:type">Function</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) A function to run on the value before returning
|
|
it. The function is not used if the cookie doesn't exist.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code property="yui:return">
|
|
Variant
|
|
</code></dt>
|
|
<dd property="yui:returnInfo">If the cookie doesn't exist, null is returned. If the subcookie
|
|
doesn't exist, null if also returned. If no converter is specified and the
|
|
subcookie exists, a string is returned. If a converter is specified and the
|
|
subcookie exists, the value returned from the converter is returned.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_getSubs">
|
|
<h4>
|
|
<a name="method_getSubs">getSubs</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
Object
|
|
<strong property="yui:name">getSubs</strong>
|
|
(
|
|
|
|
|
|
name
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Returns an object containing name-value pairs stored in the cookie with the given name.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">name</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> The name of the cookie to retrieve.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code property="yui:return">
|
|
Object
|
|
</code></dt>
|
|
<dd property="yui:returnInfo">An object of name-value pairs if the cookie with the given name
|
|
exists, null if it does not.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_remove">
|
|
<h4>
|
|
<a name="method_remove">remove</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
String
|
|
<strong property="yui:name">remove</strong>
|
|
(
|
|
|
|
|
|
name
|
|
|
|
|
|
,
|
|
options
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Removes a cookie from the machine by setting its expiration date to
|
|
sometime in the past.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">name</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> The name of the cookie to remove.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">options</span>
|
|
<<span property="yui:type">Object</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) An object containing one or more
|
|
cookie options: path (a string), domain (a string),
|
|
and secure (true/false). The expires option will be overwritten
|
|
by the method.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code property="yui:return">
|
|
String
|
|
</code></dt>
|
|
<dd property="yui:returnInfo">The created cookie string.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_removeSub">
|
|
<h4>
|
|
<a name="method_removeSub">removeSub</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
String
|
|
<strong property="yui:name">removeSub</strong>
|
|
(
|
|
|
|
|
|
name
|
|
|
|
|
|
,
|
|
subName
|
|
|
|
|
|
,
|
|
options
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Removes a subcookie with a given name. Removing the last subcookie
|
|
won't remove the entire cookie unless options.removeIfEmpty is true.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">name</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> The name of the cookie in which the subcookie exists.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">subName</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> The name of the subcookie to remove.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">options</span>
|
|
<<span property="yui:type">Object</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) An object containing one or more
|
|
cookie options: path (a string), domain (a string), expires (a Date object),
|
|
removeIfEmpty (true/false), and secure (true/false). This must be the same
|
|
settings as the original subcookie.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code property="yui:return">
|
|
String
|
|
</code></dt>
|
|
<dd property="yui:returnInfo">The created cookie string.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_set">
|
|
<h4>
|
|
<a name="method_set">set</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
String
|
|
<strong property="yui:name">set</strong>
|
|
(
|
|
|
|
|
|
name
|
|
|
|
|
|
,
|
|
value
|
|
|
|
|
|
,
|
|
options
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Sets a cookie with a given name and value.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">name</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> The name of the cookie to set.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">value</span>
|
|
<<span property="yui:type">Variant</span>>
|
|
</code>
|
|
<span property="yui:description"> The value to set for the cookie.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">options</span>
|
|
<<span property="yui:type">Object</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) An object containing one or more
|
|
cookie options: path (a string), domain (a string), expires (a Date object),
|
|
raw (true/false), and secure (true/false).</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code property="yui:return">
|
|
String
|
|
</code></dt>
|
|
<dd property="yui:returnInfo">The created cookie string.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_setSub">
|
|
<h4>
|
|
<a name="method_setSub">setSub</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
String
|
|
<strong property="yui:name">setSub</strong>
|
|
(
|
|
|
|
|
|
name
|
|
|
|
|
|
,
|
|
subName
|
|
|
|
|
|
,
|
|
value
|
|
|
|
|
|
,
|
|
options
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Sets a sub cookie with a given name to a particular value.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">name</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> The name of the cookie to set.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">subName</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> The name of the subcookie to set.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">value</span>
|
|
<<span property="yui:type">Variant</span>>
|
|
</code>
|
|
<span property="yui:description"> The value to set.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">options</span>
|
|
<<span property="yui:type">Object</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) An object containing one or more
|
|
cookie options: path (a string), domain (a string), expires (a Date object),
|
|
and secure (true/false).</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code property="yui:return">
|
|
String
|
|
</code></dt>
|
|
<dd property="yui:returnInfo">The created cookie string.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_setSubs">
|
|
<h4>
|
|
<a name="method_setSubs">setSubs</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
String
|
|
<strong property="yui:name">setSubs</strong>
|
|
(
|
|
|
|
|
|
name
|
|
|
|
|
|
,
|
|
value
|
|
|
|
|
|
,
|
|
options
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Sets a cookie with a given name to contain a hash of name-value pairs.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">name</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> The name of the cookie to set.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">value</span>
|
|
<<span property="yui:type">Object</span>>
|
|
</code>
|
|
<span property="yui:description"> An object containing name-value pairs.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">options</span>
|
|
<<span property="yui:type">Object</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) An object containing one or more
|
|
cookie options: path (a string), domain (a string), expires (a Date object),
|
|
and secure (true/false).</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code property="yui:return">
|
|
String
|
|
</code></dt>
|
|
<dd property="yui:returnInfo">The created cookie string.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div rel="yui:events" resource="#events">
|
|
|
|
|
|
</div>
|
|
|
|
<div rel="yui:attributes" resource="#configattributes">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
<div class="nav">
|
|
|
|
<div id="moduleList" class="module">
|
|
<h4>Modules</h4>
|
|
<ul class="content">
|
|
<li class=""><a href="module_animation.html" title="animation">animation</a></li>
|
|
<li class=""><a href="module_autocomplete.html" title="autocomplete">autocomplete</a></li>
|
|
<li class=""><a href="module_button.html" title="button">button</a></li>
|
|
<li class=""><a href="module_calendar.html" title="calendar">calendar</a></li>
|
|
<li class=""><a href="module_carousel.html" title="carousel">carousel</a></li>
|
|
<li class=""><a href="module_charts.html" title="charts">charts</a></li>
|
|
<li class=""><a href="module_colorpicker.html" title="colorpicker">colorpicker</a></li>
|
|
<li class=""><a href="module_connection.html" title="connection">connection</a></li>
|
|
<li class=""><a href="module_container.html" title="container">container</a></li>
|
|
<li class="selected"><a href="module_cookie.html" title="cookie">cookie</a></li>
|
|
<li class=""><a href="module_datasource.html" title="datasource">datasource</a></li>
|
|
<li class=""><a href="module_datatable.html" title="datatable">datatable</a></li>
|
|
<li class=""><a href="module_datemath.html" title="datemath">datemath</a></li>
|
|
<li class=""><a href="module_dom.html" title="dom">dom</a></li>
|
|
<li class=""><a href="module_dragdrop.html" title="dragdrop">dragdrop</a></li>
|
|
<li class=""><a href="module_editor.html" title="editor">editor</a></li>
|
|
<li class=""><a href="module_element.html" title="element">element</a></li>
|
|
<li class=""><a href="module_element-delegate.html" title="element-delegate">element-delegate</a></li>
|
|
<li class=""><a href="module_event.html" title="event">event</a></li>
|
|
<li class=""><a href="module_event-delegate.html" title="event-delegate">event-delegate</a></li>
|
|
<li class=""><a href="module_event-mouseenter.html" title="event-mouseenter">event-mouseenter</a></li>
|
|
<li class=""><a href="module_event-simulate.html" title="event-simulate">event-simulate</a></li>
|
|
<li class=""><a href="module_get.html" title="get">get</a></li>
|
|
<li class=""><a href="module_history.html" title="history">history</a></li>
|
|
<li class=""><a href="module_imagecropper.html" title="imagecropper">imagecropper</a></li>
|
|
<li class=""><a href="module_imageloader.html" title="imageloader">imageloader</a></li>
|
|
<li class=""><a href="module_json.html" title="json">json</a></li>
|
|
<li class=""><a href="module_layout.html" title="layout">layout</a></li>
|
|
<li class=""><a href="module_logger.html" title="logger">logger</a></li>
|
|
<li class=""><a href="module_menu.html" title="menu">menu</a></li>
|
|
<li class=""><a href="module_paginator.html" title="paginator">paginator</a></li>
|
|
<li class=""><a href="module_profiler.html" title="profiler">profiler</a></li>
|
|
<li class=""><a href="module_profilerviewer.html" title="profilerviewer">profilerviewer</a></li>
|
|
<li class=""><a href="module_progressbar.html" title="progressbar">progressbar</a></li>
|
|
<li class=""><a href="module_resize.html" title="resize">resize</a></li>
|
|
<li class=""><a href="module_selector.html" title="selector">selector</a></li>
|
|
<li class=""><a href="module_slider.html" title="slider">slider</a></li>
|
|
<li class=""><a href="module_storage.html" title="Storage">Storage</a></li>
|
|
<li class=""><a href="module_stylesheet.html" title="stylesheet">stylesheet</a></li>
|
|
<li class=""><a href="module_swf.html" title="swf">swf</a></li>
|
|
<li class=""><a href="module_swfdetect.html" title="swfdetect">swfdetect</a></li>
|
|
<li class=""><a href="module_swfstore.html" title="swfstore">swfstore</a></li>
|
|
<li class=""><a href="module_tabview.html" title="tabview">tabview</a></li>
|
|
<li class=""><a href="module_treeview.html" title="treeview">treeview</a></li>
|
|
<li class=""><a href="module_uploader.html" title="uploader">uploader</a></li>
|
|
<li class=""><a href="module_yahoo.html" title="yahoo">yahoo</a></li>
|
|
<li class=""><a href="module_yuiloader.html" title="yuiloader">yuiloader</a></li>
|
|
<li class=""><a href="module_yuitest.html" title="yuitest">yuitest</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div id="classList" class="module">
|
|
<h4>Classes</h4>
|
|
<ul class="content">
|
|
<li class="selected"><a href="YAHOO.util.Cookie.html" title="YAHOO.util.Cookie">YAHOO.util.Cookie</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div id="fileList" class="module">
|
|
<h4>Files</h4>
|
|
<ul class="content">
|
|
<li class=""><a href="Cookie.js.html" title="Cookie.js">Cookie.js</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
<div id="methodsList" class="module">
|
|
<h4>Methods</h4>
|
|
<ul class="content">
|
|
<li class="private"><a href="#method__createCookieHashString" title="_createCookieHashString">_createCookieHashString</a></li>
|
|
<li class="private"><a href="#method__createCookieString" title="_createCookieString">_createCookieString</a></li>
|
|
<li class="private"><a href="#method__parseCookieHash" title="_parseCookieHash">_parseCookieHash</a></li>
|
|
<li class="private"><a href="#method__parseCookieString" title="_parseCookieString">_parseCookieString</a></li>
|
|
<li class=""><a href="#method_exists" title="exists">exists</a></li>
|
|
<li class=""><a href="#method_get" title="get">get</a></li>
|
|
<li class=""><a href="#method_getSub" title="getSub">getSub</a></li>
|
|
<li class=""><a href="#method_getSubs" title="getSubs">getSubs</a></li>
|
|
<li class=""><a href="#method_remove" title="remove">remove</a></li>
|
|
<li class=""><a href="#method_removeSub" title="removeSub">removeSub</a></li>
|
|
<li class=""><a href="#method_set" title="set">set</a></li>
|
|
<li class=""><a href="#method_setSub" title="setSub">setSub</a></li>
|
|
<li class=""><a href="#method_setSubs" title="setSubs">setSubs</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="ft">
|
|
<hr />
|
|
Copyright © 2010 Yahoo! Inc. All rights reserved.
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
|
|
var ALL_YUI_PROPS = [{"access": "private", "host": "YAHOO.util.Cookie", "name": "_createCookieHashString", "url": "YAHOO.util.Cookie.html#method__createCookieHashString", "type": "method"}, {"access": "private", "host": "YAHOO.util.Cookie", "name": "_createCookieString", "url": "YAHOO.util.Cookie.html#method__createCookieString", "type": "method"}, {"access": "", "host": "YAHOO.util.Cookie", "name": "exists", "url": "YAHOO.util.Cookie.html#method_exists", "type": "method"}, {"access": "", "host": "YAHOO.util.Cookie", "name": "get", "url": "YAHOO.util.Cookie.html#method_get", "type": "method"}, {"access": "", "host": "YAHOO.util.Cookie", "name": "getSub", "url": "YAHOO.util.Cookie.html#method_getSub", "type": "method"}, {"access": "", "host": "YAHOO.util.Cookie", "name": "getSubs", "url": "YAHOO.util.Cookie.html#method_getSubs", "type": "method"}, {"access": "private", "host": "YAHOO.util.Cookie", "name": "_parseCookieHash", "url": "YAHOO.util.Cookie.html#method__parseCookieHash", "type": "method"}, {"access": "private", "host": "YAHOO.util.Cookie", "name": "_parseCookieString", "url": "YAHOO.util.Cookie.html#method__parseCookieString", "type": "method"}, {"access": "", "host": "YAHOO.util.Cookie", "name": "remove", "url": "YAHOO.util.Cookie.html#method_remove", "type": "method"}, {"access": "", "host": "YAHOO.util.Cookie", "name": "removeSub", "url": "YAHOO.util.Cookie.html#method_removeSub", "type": "method"}, {"access": "", "host": "YAHOO.util.Cookie", "name": "set", "url": "YAHOO.util.Cookie.html#method_set", "type": "method"}, {"access": "", "host": "YAHOO.util.Cookie", "name": "setSub", "url": "YAHOO.util.Cookie.html#method_setSub", "type": "method"}, {"access": "", "host": "YAHOO.util.Cookie", "name": "setSubs", "url": "YAHOO.util.Cookie.html#method_setSubs", "type": "method"}];
|
|
</script>
|
|
</body>
|
|
</html>
|