Library for management of user form input.

Ensures incoming variables are cleaned up, provides base input class used by other elements for value manipulation.

  • version: $Id: input.lib.php,v 1.3 2005/01/28 07:15:57 ebullient Exp $
Class Description
 class input_base Base input element class - for forms, cookies, and session vars
 class input_form_element Base input element class for form elements
INFUSE_COOKIE = 4 (line 31)

Check for values in $_COOKIE.

INFUSE_FORM = 6 (line 35)

Check for values in order: $_POST, $_GET.

INFUSE_GET = 1 (line 25)

Check for values in $_GET.

INFUSE_INORDER = 0 (line 23)

Check for values in order: $_SESSION, $_POST, $_GET.

INFUSE_LIB_VERSION = 0.9 (line 20)

Infuse library version

INFUSE_POST = 2 (line 27)

Check for values in $_POST.

INFUSE_SERVER = 5 (line 33)

Check for values in $_SERVER.

INFUSE_SESSION = 3 (line 29)

Check for values in $_SESSION.

infuse_ensureIntInRange (line 371)

Make sure that the specified number lies between min and max.

If $value is null, or not an int, the method does nothing. If $value is less than $min, it is reset to $min. If $value is greater than $max, it is reset to $max.

void infuse_ensureIntInRange (int &$value, int $min, int $max)
  • int $value: Value to ensure is within range - changed if necessary
  • int $min: Minimum value of range
  • int $max: Maximum value of range
infuse_getInputVar (line 304)

Search for the var $name in $_SESSION, $_POST, $_GET, $_COOKIE, or $_SERVER and set it, by reference, into a specified variable.

$search is an int value equal to one of the defined constants: INFUSE_INORDER, INFUSE_SESSION, INFUSE_FORM, INFUSE_POST, INFUSE_GET, INFUSE_COOKIE, INFUSE_SERVER.

If $search specifies a sequence (like INFUSE_INORDER or INFUSE_FORM), infuse_getInputVar will return the first value encountered.

example: infuse_getInputVar('username', $username, INFUSE_SESSION);

bool infuse_getInputVar (string $name, mixed &$value, [int $search = INFUSE_INORDER])
  • string $name: Name of variable to retrieve.
  • mixed $value: Reference to variable to fill with value associated with $name (if found).
  • int $search: One of the INFUSE_ constants that specifies where to look for value.
infuse_getRegexLength (line 390)

Return a guess about the length required by a given regex.

int infuse_getRegexLength (string $regex, int $default)
  • string $regex: Regular Expression to analyze
  • int $default: Default length to return if no other guesses can be made
infuse_stripslashes (line 258)

Recursively strip slashes from the values of an array.

void infuse_stripslashes (array &$array)
  • array $array: reference to array

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