Class Zend_Filter_Input

Description
  • license: New BSD License
  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Filter/Input.php (line 37)


	
			
Variable Summary
 array $_source
Method Summary
 void __construct ( &$source, [boolean $strict = true], array $source)
 mixed getAlnum (mixed $key)
 mixed getAlpha (mixed $key)
 mixed getDigits (mixed $key)
 mixed getDir (mixed $key)
 mixed getInt (mixed $key)
 mixed getPath (mixed $key)
 mixed getRaw (mixed $key)
 boolean keyExists (mixed $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, [boolean $inc = true])
 mixed testCcnum (mixed $key)
 mixed testDate (mixed $key)
 mixed testDigits (mixed $key)
 mixed testEmail (mixed $key)
 mixed testFloat (mixed $key)
 mixed testGreaterThan (mixed $key,  $min)
 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)
 mixed testOneOf (mixed $key,  $allowed)
 mixed testRegex (mixed $key, mixed $pattern)
Variables
array $_source = null (line 44)

Input data source

  • access: protected
Methods
Constructor __construct (line 54)

Stores a reference to the data source array and removes the reference $source when $strict is true

  • access: public
void __construct ( &$source, [boolean $strict = true], array $source)
  • array $source
  • boolean $strict
  • array &$source
getAlnum (line 85)

Returns only the alphabetic characters and digits in value.

  • access: public
  • deprecated: since 0.8.0
mixed getAlnum (mixed $key)
  • mixed $key
getAlpha (line 70)

Returns only the alphabetic characters in value.

  • access: public
  • deprecated: since 0.8.0
mixed getAlpha (mixed $key)
  • mixed $key
getDigits (line 100)

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

  • access: public
  • deprecated: since 0.8.0
mixed getDigits (mixed $key)
  • mixed $key
getDir (line 115)

Returns dirname(value).

  • access: public
  • deprecated: since 0.8.0
mixed getDir (mixed $key)
  • mixed $key
getInt (line 130)

Returns (int) value.

  • access: public
  • deprecated: since 0.8.0
mixed getInt (mixed $key)
  • mixed $key
getPath (line 145)

Returns realpath(value).

  • access: public
  • deprecated: since 0.8.0
mixed getPath (mixed $key)
  • mixed $key
getRaw (line 159)

Returns value.

  • access: public
mixed getRaw (mixed $key)
  • mixed $key
keyExists (line 528)

Checks if a key exists

  • access: public
boolean keyExists (mixed $key)
  • mixed $key
noPath (line 514)

Returns basename(value).

  • access: public
  • deprecated: since 0.8.0
mixed noPath (mixed $key)
  • mixed $key
noTags (line 499)

Returns value with all tags removed.

  • access: public
  • deprecated: since 0.8.0
mixed noTags (mixed $key)
  • mixed $key
testAlnum (line 175)

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

  • access: public
  • deprecated: since 0.8.0
mixed testAlnum (mixed $key)
  • mixed $key
testAlpha (line 195)

Returns value if every character is alphabetic, FALSE otherwise.

  • access: public
  • deprecated: since 0.8.0
mixed testAlpha (mixed $key)
  • mixed $key
testBetween (line 220)

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
  • deprecated: since 0.8.0
mixed testBetween (mixed $key, mixed $min, mixed $max, [boolean $inc = true])
  • mixed $key
  • mixed $min
  • mixed $max
  • boolean $inc
testCcnum (line 241)

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

  • access: public
  • deprecated: since 0.8.0
mixed testCcnum (mixed $key)
  • mixed $key
testDate (line 261)

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

  • access: public
  • deprecated: since 0.8.0
mixed testDate (mixed $key)
  • mixed $key
testDigits (line 281)

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

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

  • access: public
  • deprecated: since 0.8.0
mixed testDigits (mixed $key)
  • mixed $key
testEmail (line 300)

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

  • access: public
  • deprecated: since 0.8.0
mixed testEmail (mixed $key)
  • mixed $key
testFloat (line 319)

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

  • access: public
  • deprecated: since 0.8.0
mixed testFloat (mixed $key)
  • mixed $key
testGreaterThan (line 338)

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

  • access: public
  • deprecated: since 0.8.0
mixed testGreaterThan (mixed $key,  $min)
  • mixed $key
  • $min
testHex (line 358)

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

  • access: public
  • deprecated: since 0.8.0
mixed testHex (mixed $key)
  • mixed $key
testHostname (line 382)

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
  • deprecated: since 0.8.0
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 401)

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

  • access: public
  • deprecated: since 0.8.0
mixed testInt (mixed $key)
  • mixed $key
testIp (line 420)

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

  • access: public
  • deprecated: since 0.8.0
mixed testIp (mixed $key)
  • mixed $key
testLessThan (line 440)

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

  • access: public
  • deprecated: since 0.8.0
mixed testLessThan (mixed $key, mixed $max)
  • mixed $key
  • mixed $max
testOneOf (line 459)

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

  • access: public
  • deprecated: since 0.8.0
mixed testOneOf (mixed $key,  $allowed)
  • mixed $key
  • array $allowed
testRegex (line 480)

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

  • access: public
  • deprecated: since 0.8.0
mixed testRegex (mixed $key, mixed $pattern)
  • mixed $key
  • mixed $pattern

Documentation generated on Wed, 21 Feb 2007 11:51:51 -0800 by phpDocumentor 1.3.1