Class input_cookie

Description

Input cookie class.

This class defines an input cookie, it handles input validation, and setting and retrieving the cookies value.

  • version: $Revision: 1.3 $

Located in /input.cookie.php (line 37)

input_base
   |
   --input_cookie
Variable Summary
 string $domain
 int $expire
 string $path
 bool $secure
Method Summary
 input_cookie input_cookie (string $name, [string $regex = NULL], [string $value = NULL], [int $expire = INFUSE_COOKIE_EXPIRE], [string $path = INFUSE_COOKIE_PATH], [string $domain = INFUSE_COOKIE_DOMAIN], [bool $secure = INFUSE_COOKIE_SECURE])
 bool delete ()
 void reset ()
 bool set (string $value)
 bool testCookie ([bool $send = FALSE])
Variables
string $domain (line 58)

The domain the cookie is valid for.

int $expire (line 44)

How long til the cookie expires in seconds.

string $path (line 51)

The path the cookie is valid for.

bool $secure (line 65)

Whether the cookie should only be sent over secure HTTP.

Inherited Variables

Inherited from input_base

input_base::$default
input_base::$name
input_base::$regex
input_base::$required
input_base::$value
input_base::$wasSet
input_base::$wasValid
Methods
Constructor input_cookie (line 83)

Constructs a new cookie object.

input_cookie input_cookie (string $name, [string $regex = NULL], [string $value = NULL], [int $expire = INFUSE_COOKIE_EXPIRE], [string $path = INFUSE_COOKIE_PATH], [string $domain = INFUSE_COOKIE_DOMAIN], [bool $secure = INFUSE_COOKIE_SECURE])
  • string $name: name The name of the querystring object.
  • string $regex: regex The validation regular expression.
  • string $value: value The initial contents value.
  • int $expire: expire How long til the cookie expires in seconds.
  • string $path: path The path the cookie is valid for.
  • string $domain: domain The domain the cookie is valid for.
  • bool $secure: secure Whether the cookie should only be sent over secure HTTP.
delete (line 131)

Delete the cookie from the client.

  • return: TRUE on success.
bool delete ()
reset (line 100)

Reset to default value

void reset ()

Redefinition of:
input_base::reset()
Reset to value specified as default.
set (line 111)

Sets the value of the cookie object.

  • return: TRUE on success.
bool set (string $value)
  • string $value: value The value to set the cookie to.

Redefinition of:
input_base::set()
Sets the value of the object to the specified value if that value is valid according to regex given to constructor.
testCookie (line 149)

Test browser support for cookies.

  • return: TRUE if $send is TRUE, or if browser returned set cookie; otherwise return FALSE.
  • static:
bool testCookie ([bool $send = FALSE])
  • bool $send: If true, send a new cookie (will always return TRUE).

Inherited Methods

Inherited From input_base

 input_base::input_base()
 input_base::reset()
 input_base::set()

Documentation generated on Fri, 28 Jan 2005 10:00:55 -0800 by phpDocumentor 1.2.3