Class Zend_InputFilter

Description

Located in /library/Zend/InputFilter.php (line 39)


	
			
Variable Summary
 mixed $_source
Method Summary
 Zend_InputFilter __construct ([mixed &$source = NULL], [mixed $strict = TRUE])
 mixed getAlnum (mixed $key)
 mixed getAlpha (mixed $key)
 mixed getDigits (mixed $key)
 mixed getDir (mixed $key)
 int getInt (mixed $key)
 mixed getLength (mixed $key, [int $length = NULL])
 mixed getPath (mixed $key)
 mixed getRaw (string $key)
 mixed isAlnum (mixed $key)
 mixed isAlpha (mixed $key)
 mixed isBetween (mixed $key, [mixed $min = NULL], [mixed $max = NULL], [mixed $inc = TRUE], boolean $inclusive)
 mixed isCcnum (mixed $key, [mixed $type = NULL])
 mixed isDate (mixed $key)
 mixed isDigits (mixed $key)
 mixed isEmail (mixed $key)
 mixed isFloat (mixed $key)
 mixed isGreaterThan (mixed $key, [mixed $min = NULL])
 mixed isHex (mixed $key)
 mixed isHostname (mixed $key, [integer $allow = Zend_Filter::HOST_ALLOW_ALL])
 mixed isInt (mixed $key)
 mixed isIp (mixed $key)
 mixed isLength (mixed $key, [mixed $min = NULL], [mixed $max = NULL])
 mixed isLessThan (mixed $key, [mixed $max = NULL])
 mixed isName (mixed $key)
 mixed isOneOf (mixed $key, [mixed $allowed = NULL])
 mixed isPhone (mixed $key, [mixed $country = 'US'])
 mixed isRegex (mixed $key, [mixed $pattern = NULL])
 void isUri (mixed $key)
 mixed isZip (mixed $key)
 mixed noPath (mixed $key)
 mixed noTags (mixed $key)
Variables
mixed $_source = NULL (line 41)
  • access: protected
Methods
Constructor __construct (line 43)
  • access: public
Zend_InputFilter __construct ([mixed &$source = NULL], [mixed $strict = TRUE])
getAlnum (line 69)

Returns only the alphabetic characters and digits in value.

  • access: public
mixed getAlnum (mixed $key)
  • mixed $key
getAlpha (line 58)

Returns only the alphabetic characters in value.

  • access: public
mixed getAlpha (mixed $key)
  • mixed $key
getDigits (line 80)

Returns only the digits in value. This differs from getInt().

  • access: public
mixed getDigits (mixed $key)
  • mixed $key
getDir (line 91)

Returns dirname(value).

  • access: public
mixed getDir (mixed $key)
  • mixed $key
getInt (line 102)

Returns (int) value.

  • access: public
int getInt (mixed $key)
  • mixed $key
getLength (line 114)

Returns first $length characters of value.

  • access: public
mixed getLength (mixed $key, [int $length = NULL])
  • mixed $key
  • int $length
getPath (line 125)

Returns realpath(value).

  • access: public
mixed getPath (mixed $key)
  • mixed $key
getRaw (line 136)

Returns value.

  • access: public
mixed getRaw (string $key)
  • string $key
isAlnum (line 148)

Returns value if every character is alphabetic or a digit, FALSE otherwise.

  • access: public
mixed isAlnum (mixed $key)
  • mixed $key
isAlpha (line 160)

Returns value if every character is alphabetic, FALSE otherwise.

  • access: public
mixed isAlpha (mixed $key)
  • mixed $key
isBetween (line 177)

Returns value if it is greater than or equal to $min and less than or equal to $max, FALSE otherwise. If $inc is set to FALSE, then the value must be strictly greater than $min and strictly less than $max.

  • access: public
mixed isBetween (mixed $key, [mixed $min = NULL], [mixed $max = NULL], [mixed $inc = TRUE], boolean $inclusive)
  • mixed $key
  • mixed $min
  • mixed $max
  • boolean $inclusive
isCcnum (line 191)

Returns value if it is a valid credit card number format. The optional second argument allows developers to indicate the type.

  • access: public
mixed isCcnum (mixed $key, [mixed $type = NULL])
  • mixed $key
  • mixed $type
isDate (line 203)

Returns $value if it is a valid date, FALSE otherwise. The date is required to be in ISO 8601 format.

  • access: public
mixed isDate (mixed $key)
  • mixed $key
isDigits (line 215)

Returns value if every character is a digit, FALSE otherwise.

This is just like isInt(), except there is no upper limit.

  • access: public
mixed isDigits (mixed $key)
  • mixed $key
isEmail (line 226)

Returns value if it is a valid email format, FALSE otherwise.

  • access: public
mixed isEmail (mixed $key)
  • mixed $key
isFloat (line 237)

Returns value if it is a valid float value, FALSE otherwise.

  • access: public
mixed isFloat (mixed $key)
  • mixed $key
isGreaterThan (line 249)

Returns value if it is greater than $min, FALSE otherwise.

  • access: public
mixed isGreaterThan (mixed $key, [mixed $min = NULL])
  • mixed $key
  • mixed $min
isHex (line 261)

Returns value if it is a valid hexadecimal format, FALSE otherwise.

  • access: public
mixed isHex (mixed $key)
  • mixed $key
isHostname (line 278)

Returns value if it is a valid hostname, FALSE otherwise.

Depending upon the value of $allow, Internet domain names, IP addresses, and/or local network names are considered valid. The default is HOST_ALLOW_ALL, which considers all of the above to be valid.

  • access: public
  • throws: Zend_Filter_Exception
mixed isHostname (mixed $key, [integer $allow = Zend_Filter::HOST_ALLOW_ALL])
  • mixed $key
  • integer $allow: bitfield for HOST_ALLOW_DNS, HOST_ALLOW_IP, HOST_ALLOW_LOCAL
isInt (line 289)

Returns value if it is a valid integer value, FALSE otherwise.

  • access: public
mixed isInt (mixed $key)
  • mixed $key
isIp (line 300)

Returns value if it is a valid IP format, FALSE otherwise.

  • access: public
mixed isIp (mixed $key)
  • mixed $key
isLength (line 314)

Returns value if its length is greater than $min and less than $max, FALSE otherwise.

  • access: public
mixed isLength (mixed $key, [mixed $min = NULL], [mixed $max = NULL])
  • mixed $key
  • mixed $min
  • mixed $max
isLessThan (line 326)

Returns value if it is less than $max, FALSE otherwise.

  • access: public
mixed isLessThan (mixed $key, [mixed $max = NULL])
  • mixed $key
  • mixed $max
isName (line 338)

Returns value if it is a valid format for a person's name, FALSE otherwise.

  • access: public
mixed isName (mixed $key)
  • mixed $key
isOneOf (line 349)

Returns value if it is one of $allowed, FALSE otherwise.

  • access: public
mixed isOneOf (mixed $key, [mixed $allowed = NULL])
  • mixed $key
isPhone (line 361)

Returns value if it is a valid phone number format, FALSE otherwise. The optional second argument indicates the country.

  • access: public
mixed isPhone (mixed $key, [mixed $country = 'US'])
  • mixed $key
isRegex (line 374)

Returns value if it matches $pattern, FALSE otherwise. Uses preg_match() for the matching.

  • access: public
mixed isRegex (mixed $key, [mixed $pattern = NULL])
  • mixed $key
  • mixed $pattern
isUri (line 379)
  • access: public
void isUri (mixed $key)
isZip (line 390)

Returns value if it is a valid US ZIP, FALSE otherwise.

  • access: public
mixed isZip (mixed $key)
  • mixed $key
noPath (line 412)

Returns basename(value).

  • access: public
mixed noPath (mixed $key)
  • mixed $key
noTags (line 401)

Returns value with all tags removed.

  • access: public
mixed noTags (mixed $key)
  • mixed $key

Documentation generated on Wed, 08 Mar 2006 04:53:06 -0800 by phpDocumentor 1.3.0RC4