Class Gadget_Cookie

Description

Gadget_Cookie

  • since: 1.2

Located in /Gadget/Cookie.php (line 30)


	
			
Method Summary
mixed get (string $name, [bool $parse = true])
bool reset (string $name)
bool set (string $name, [array $params = array()], [bool $session = false])
Methods
get (line 80)

Get Cookie

Retrieves the value of an HTTP cookie. The value will be urldecoded like a query string of an URL unless $parse is FALSE.

mixed get (string $name, [bool $parse = true])
  • string $name: Cookie name.
  • bool $parse: Whether to parse the value of the cookie like a query string of an URL.
reset (line 105)

Reset Cookie

Unsets an HTTP cookie. The contents of the cookie $name will be set to null and the date to expire will be set to 1 (unix timestamp).

bool reset (string $name)
  • string $name: Cookie name.
set (line 51)

Set Cookie

This is a convinience method to set an persistent or a session cookie. Its lifetime is the date of MAXINT (as unix timestamp) if the cookie is persistent, or to 0 if the cookie is supposed to expire at the end of the session. The parameters will be urlencoded just like a query string of an URL. If the $params argument is not an array it will be passed through to setcookie().

bool set (string $name, [array $params = array()], [bool $session = false])
  • string $name: Cookie name.
  • array $params: Cookie's contents as associative array.
  • bool $session: Whether Cookie is valid for the session only.

Documentation generated on Sun, 03 Jul 2005 12:45:37 +0200 by phpDocumentor 1.3.0RC3