Class Zend_Filter

Description

Located in /Zend/Filter.php (line 34)


	
			
Class Constant Summary
Method Summary
static mixed getAlnum (mixed $value)
static mixed getAlpha (mixed $value)
static mixed getDigits (mixed $value)
static mixed getDir (mixed $value)
static int getInt (mixed $value)
static mixed getPath (mixed $value)
static mixed isAlnum (mixed $value)
static mixed isAlpha (mixed $value)
static mixed isBetween ( $value, mixed $min, mixed $max, [ $inc = TRUE], mixed $key, boolean $inclusive)
static mixed isCcnum (mixed $value, [mixed $type = NULL])
static mixed isDate (mixed $value)
static bool isDigits (mixed $value)
static mixed isEmail (mixed $value)
static mixed isFloat (mixed $value)
static mixed isGreaterThan (mixed $value, mixed $min)
static mixed isHex (mixed $value)
static mixed isHostname (mixed $value, [integer $allow = self::HOST_ALLOW_ALL])
static mixed isInt (mixed $value)
static mixed isIp (mixed $value)
static mixed isLessThan (mixed $value, mixed $max)
static mixed isName (mixed $value)
static mixed isOneOf (mixed $value, [ $allowed = NULL])
static mixed isPhone (mixed $value, [ $country = 'US'])
static mixed isRegex (mixed $value, [mixed $pattern = NULL])
static void isUri ( $value)
static bool isZip (mixed $value)
static mixed noPath (mixed $value)
static mixed noTags (mixed $value)
Methods
static method getAlnum (line 69)

Returns only the alphabetic characters and digits in value.

  • access: public
static mixed getAlnum (mixed $value)
  • mixed $value
static method getAlpha (line 58)

Returns only the alphabetic characters in value.

  • access: public
static mixed getAlpha (mixed $value)
  • mixed $value
static method getDigits (line 80)

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

  • access: public
static mixed getDigits (mixed $value)
  • mixed $value
static method getDir (line 91)

Returns dirname(value).

  • access: public
static mixed getDir (mixed $value)
  • mixed $value
static method getInt (line 102)

Returns (int) value.

  • access: public
static int getInt (mixed $value)
  • mixed $value
static method getPath (line 113)

Returns realpath(value).

  • access: public
static mixed getPath (mixed $value)
  • mixed $value
static method isAlnum (line 125)

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

  • access: public
static mixed isAlnum (mixed $value)
  • mixed $value
static method isAlpha (line 137)

Returns value if every character is alphabetic, FALSE otherwise.

  • access: public
static mixed isAlpha (mixed $value)
  • mixed $value
static method isBetween (line 154)

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
static mixed isBetween ( $value, mixed $min, mixed $max, [ $inc = TRUE], mixed $key, boolean $inclusive)
  • mixed $key
  • mixed $min
  • mixed $max
  • boolean $inclusive
  • $value
  • $inc
static method isCcnum (line 179)

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

  • access: public
static mixed isCcnum (mixed $value, [mixed $type = NULL])
  • mixed $value
  • mixed $type
static method isDate (line 213)

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

  • access: public
static mixed isDate (mixed $value)
  • mixed $value
static method isDigits (line 227)

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

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

  • access: public
static bool isDigits (mixed $value)
  • mixed $value
static method isEmail (line 238)

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

  • access: public
static mixed isEmail (mixed $value)
  • mixed $value
static method isFloat (line 251)

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

  • access: public
static mixed isFloat (mixed $value)
  • mixed $value
static method isGreaterThan (line 268)

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

  • access: public
static mixed isGreaterThan (mixed $value, mixed $min)
  • mixed $value
  • mixed $min
static method isHex (line 280)

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

  • access: public
static mixed isHex (mixed $value)
  • mixed $value
static method isHostname (line 297)

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
static mixed isHostname (mixed $value, [integer $allow = self::HOST_ALLOW_ALL])
  • mixed $value
  • integer $allow: bitfield for HOST_ALLOW_DNS, HOST_ALLOW_IP, HOST_ALLOW_LOCAL
static method isInt (line 359)

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

  • access: public
static mixed isInt (mixed $value)
  • mixed $value
static method isIp (line 375)

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

  • access: public
static mixed isIp (mixed $value)
  • mixed $value
static method isLessThan (line 387)

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

  • access: public
static mixed isLessThan (mixed $value, mixed $max)
  • mixed $value
  • mixed $max
static method isName (line 399)

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

  • access: public
static mixed isName (mixed $value)
  • mixed $value
static method isOneOf (line 410)

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

  • access: public
static mixed isOneOf (mixed $value, [ $allowed = NULL])
  • mixed $value
  • $allowed
static method isPhone (line 429)

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

This method requires that the value consist of only digits.

  • access: public
static mixed isPhone (mixed $value, [ $country = 'US'])
  • mixed $value
  • $country
static method isRegex (line 505)

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

  • access: public
static mixed isRegex (mixed $value, [mixed $pattern = NULL])
  • mixed $value
  • mixed $pattern
static method isUri (line 510)
  • access: public
static void isUri ( $value)
  • $value
static method isZip (line 523)

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

  • access: public
static bool isZip (mixed $value)
  • mixed $value
static method noPath (line 545)

Returns basename(value).

  • access: public
static mixed noPath (mixed $value)
  • mixed $value
static method noTags (line 534)

Returns value with all tags removed.

  • access: public
static mixed noTags (mixed $value)
  • mixed $value
Class Constants
HOST_ALLOW_ALL = 7 (line 50)
HOST_ALLOW_DNS = 1 (line 47)

Options for isHostname() that specify which types of hostnames to allow.

HOST_ALLOW_DNS: Allows Internet domain names (e.g., example.com). HOST_ALLOW_IP: Allows IP addresses. HOST_ALLOW_LOCAL: Allows local network names (e.g., localhost, www.localdomain) and Internet domain names. HOST_ALLOW_ALL: Allows all of the above types of hostnames.

HOST_ALLOW_IP = 2 (line 48)
HOST_ALLOW_LOCAL = 4 (line 49)

Documentation generated on Sun, 29 Oct 2006 21:27:15 -0600 by phpDocumentor 1.3.0RC6