Class Zend_Filter

Description

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


	
			
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 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 getAlnum (line 67)

Returns only the alphabetic characters and digits in value.

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

Returns only the alphabetic characters in value.

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

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

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

Returns dirname(value).

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

Returns (int) value.

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

Returns realpath(value).

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

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

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

Returns TRUE if every character is alphabetic, FALSE otherwise.

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

Returns TRUE if value 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 isCcnum (line 177)

Returns TRUE 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 isDate (line 211)

Returns TRUE if value 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 isDigits (line 225)

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 isEmail (line 236)

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

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

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

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

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

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

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

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

Returns TRUE if value 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 isInt (line 359)

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

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

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

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

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

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

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

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

Returns TRUE if value 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 isRegex (line 493)

Returns TRUE if value 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 isUri (line 498)
  • access: public
static void isUri ( $value)
  • $value
static isZip (line 513)

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

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

Returns basename(value).

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

Returns value with all tags removed.

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

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 46)
HOST_ALLOW_LOCAL = 4 (line 47)

Documentation generated on Thu, 18 Jan 2007 09:53:45 -0800 by phpDocumentor 1.3.1