Cookie
A cookie has a name, a single value and optional attributes such as path, domain qualifiers and a maximum age.
This class supports both the Version 0 (by Netscape) and Version 1 (by RFC 2109) cookie specifications. By default, cookies are created using Version 0 to ensure the best interoperability.
Located in /connector/PHRUTS_Cookie.php (line 36)
Constructs a cookie with a specified name and value.
The name must conform to RFC 2109. That means it can contain only ASCII alphanumeric characters and cannot contain commas, semicolons, or white space or begin with a $ character. The cookie's name cannot be changed after creation.
The value can be anything the server chooses to send. Its value is probably of interest only to the server. The cookie's value can be changed after creation with the setValue method.
Returns the domain name set for this cookie.
The form of the domain name is set by RFC 2109.
Return true if the cookie is accessible only through the HTTP protocol.
Returns the maximum age of the cookie, specified in seconds.
By default, -1 indicating the cookie will persist until browser shutdown.
Returns the name of the cookie.
The name cannot be changed after creation.
Returns the path on the server to which the browser returns this cookie.
The cookie is visible to all subpaths on the server.
Returns true if the browser is sending cookies only over a secure protocol, or false if the browser can send cookies using any protocol.
Returns the value of the cookie.
Tests a string and returns true if the string counts as a reserved token in the PHP language.
Specifies the domain within which this cookie should be presented.
The form of the domain name is specified by RFC 2109. A domain name begins with a dot (".foo.com") and means that the cookie is visible to servers in a specified Domain Name System (DNS) zone (for example, "www.foo.com", but not "a.b.foo.com". By default, cookies are only returned to the server that sent them.
When true the cookie will be made accessible only through the HTTP protocol.
This means that the cookie won't be accessible by scripting languages, such as JavaScript. This setting can effectly help to reduce identity theft through XSS attacks (although it is not supported by all browsers).
Sets the maximum age of the cookie in seconds.
A positive value indicates that the cookie will expire after that many seconds have passed. Note that the value is the maximum age when the cookie will expire, not the cookie's current age.
A negative value means that the cookie is not stored persistently and will be deleted when the Web browser exits. A zero value causes the cookie to be deleted.
Specifies a path for the cookie to which the client should return the cookie.
The cookie is visible to all the pages in the directory you specify, and all the pages in that directory's subdirectories. A cookie's path must include the servlet that set the cookie, for example, /catalog, which makes the cookie visible to all directories on the server under /catalog.
Consult RFC 2109 (available on the Internet) for more information on setting path names for cookies.
Indicates to the browser whether the cookie should only be sent using a secure protocol, such as HTTPS or SSL.
The default value is false.
Assigns a new value to a cookie after the cookie is created.
Null or empty value causes the cookie to be deleted.
If you use a binary value, you may want to use BASE64 encoding.
With Version 0 cookies, values should not contain white space, brackets, parentheses, equals signs, commas, double quotes, slashes, question marks, at signs, colons, and semicolons.
Documentation generated on Sat, 31 May 2008 15:46:01 +0200 by phpDocumentor 1.4.1