Class Zend_InputFilter

Description

Located in /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 getPath (mixed $key)
 mixed getRaw (string $key)
 mixed noPath (mixed $key)
 mixed noTags (mixed $key)
 mixed testAlnum (mixed $key)
 mixed testAlpha (mixed $key)
 mixed testBetween (mixed $key, mixed $min, mixed $max, [mixed $inc = TRUE], boolean $inclusive)
 mixed testCcnum (mixed $key, [mixed $type = NULL])
 mixed testDate (mixed $key)
 mixed testDigits (mixed $key)
 mixed testEmail (mixed $key)
 mixed testFloat (mixed $key)
 mixed testGreaterThan (mixed $key, [mixed $min = NULL])
 mixed testHex (mixed $key)
 mixed testHostname (mixed $key, [integer $allow = Zend_Filter::HOST_ALLOW_ALL])
 mixed testInt (mixed $key)
 mixed testIp (mixed $key)
 mixed testLessThan (mixed $key, [mixed $max = NULL])
 mixed testName (mixed $key)
 mixed testOneOf (mixed $key, [mixed $allowed = NULL])
 mixed testPhone (mixed $key, [mixed $country = 'US'])
 mixed testRegex (mixed $key, [mixed $pattern = NULL])
 void testUri (mixed $key)
 mixed testZip (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
getPath (line 113)

Returns realpath(value).

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

Returns value.

  • access: public
mixed getRaw (string $key)
  • string $key
noPath (line 466)

Returns basename(value).

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

Returns value with all tags removed.

  • access: public
mixed noTags (mixed $key)
  • mixed $key
testAlnum (line 136)

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

  • access: public
mixed testAlnum (mixed $key)
  • mixed $key
testAlpha (line 152)

Returns value if every character is alphabetic, FALSE otherwise.

  • access: public
mixed testAlpha (mixed $key)
  • mixed $key
testBetween (line 173)

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 testBetween (mixed $key, mixed $min, mixed $max, [mixed $inc = TRUE], boolean $inclusive)
  • mixed $key
  • mixed $min
  • mixed $max
  • boolean $inclusive
testCcnum (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 testCcnum (mixed $key, [mixed $type = NULL])
  • mixed $key
  • mixed $type
testDate (line 207)

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

  • access: public
mixed testDate (mixed $key)
  • mixed $key
testDigits (line 223)

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

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

  • access: public
mixed testDigits (mixed $key)
  • mixed $key
testEmail (line 238)

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

  • access: public
mixed testEmail (mixed $key)
  • mixed $key
testFloat (line 253)

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

  • access: public
mixed testFloat (mixed $key)
  • mixed $key
testGreaterThan (line 269)

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

  • access: public
mixed testGreaterThan (mixed $key, [mixed $min = NULL])
  • mixed $key
  • mixed $min
testHex (line 285)

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

  • access: public
mixed testHex (mixed $key)
  • mixed $key
testHostname (line 306)

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 testHostname (mixed $key, [integer $allow = Zend_Filter::HOST_ALLOW_ALL])
  • mixed $key
  • integer $allow: bitfield for HOST_ALLOW_DNS, HOST_ALLOW_IP, HOST_ALLOW_LOCAL
testInt (line 321)

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

  • access: public
mixed testInt (mixed $key)
  • mixed $key
testIp (line 336)

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

  • access: public
mixed testIp (mixed $key)
  • mixed $key
testLessThan (line 352)

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

  • access: public
mixed testLessThan (mixed $key, [mixed $max = NULL])
  • mixed $key
  • mixed $max
testName (line 368)

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

  • access: public
mixed testName (mixed $key)
  • mixed $key
testOneOf (line 383)

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

  • access: public
mixed testOneOf (mixed $key, [mixed $allowed = NULL])
  • mixed $key
testPhone (line 399)

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

  • access: public
mixed testPhone (mixed $key, [mixed $country = 'US'])
  • mixed $key
testRegex (line 416)

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

  • access: public
mixed testRegex (mixed $key, [mixed $pattern = NULL])
  • mixed $key
  • mixed $pattern
testUri (line 425)
  • access: public
void testUri (mixed $key)
testZip (line 440)

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

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

Documentation generated on Tue, 18 Apr 2006 11:55:13 -0700 by phpDocumentor 1.3.0RC3