Class input_base


Base input element class - for forms, cookies, and session vars

  • version: $Revision: 1.3 $

Located in /input.lib.php (line 59)

Direct descendents
Class Description
 class input_cookie Input cookie class.
 class input_form_element Base input element class for form elements
 class input_querystring Input querystring class.
 class input_session Used to store/retrieve data from the session.
Variable Summary
 mixed $default
 string $name
 string $regex
 bool $required
 string $value
 bool $wasSet
 bool $wasValid
Method Summary
 input_base input_base (string $name, [string $regex = NULL], [string $value = NULL], [bool $required = FALSE], [constant $method = INFUSE_FORM])
 void reset ()
 bool set (string $value)
mixed $default (line 108)

Default value (provided by caller).

string $name (line 66)

The name of the element.

string $regex (line 80)

The regular expression used to validate the objects contents.

bool $required (line 101)

Whether or not element is required

string $value (line 73)

The value of the element.

bool $wasSet = FALSE (line 87)

Whether the value was set by form submission

bool $wasValid = FALSE (line 94)

Whether the value set by form submission was correct

Constructor input_base (line 126)

Constructs a new base object.

input_base input_base (string $name, [string $regex = NULL], [string $value = NULL], [bool $required = FALSE], [constant $method = INFUSE_FORM])
  • string $name: The name of the form element.
  • string $regex: A regular expression used to validate supplied data, or null.
  • string $value: The default value - used if not otherwise specified (in form, session, or cookie data).
  • bool $required: True if item is required.
  • constant $method: One of the constants specifying location of input values.
reset (line 156)

Reset to value specified as default.

Clear wasSet and wasValid.

void reset ()

Redefined in descendants as:
set (line 171)

Sets the value of the object to the specified value if that value is valid according to regex given to constructor.

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

Redefined in descendants as:

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