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 mixed 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 mixed isZip (mixed $value)
 static mixed noPath (mixed $value)
 static mixed noTags (mixed $value)
Methods
static getAlnum (line 69)

Returns only the alphabetic characters and digits in value.

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

Returns only the alphabetic characters in value.

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

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

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

Returns dirname(value).

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

Returns (int) value.

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

Returns realpath(value).

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

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

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

Returns value if every character is alphabetic, FALSE otherwise.

  • access: public
mixed isAlpha (mixed $value)
  • mixed $value
static 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
mixed isBetween ( $value, mixed $min, mixed $max, [ $inc = TRUE], mixed $key, boolean $inclusive)
  • mixed $key
  • mixed $min
  • mixed $max
  • boolean $inclusive
  • $value
  • $inc
static 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
mixed isCcnum (mixed $value, [mixed $type = NULL])
  • mixed $value
  • mixed $type
static isDate (line 212)

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 $value)
  • mixed $value
static isDigits (line 226)

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 $value)
  • mixed $value
static isEmail (line 237)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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
mixed isPhone (mixed $value, [ $country = 'US'])
  • mixed $value
  • $country
static isRegex (line 504)

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

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

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

  • access: public
mixed isZip (mixed $value)
  • mixed $value
static noPath (line 544)

Returns basename(value).

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

Returns value with all tags removed.

  • access: public
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 Fri, 30 Jun 2006 11:20:36 -0500 by phpDocumentor 1.3.0RC6