Class Zend_Filter

Description

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


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

Returns only the alphabetic characters and digits in value.

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

Returns only the alphabetic characters in value.

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

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

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

Returns dirname(value).

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

Returns (int) value.

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

Returns realpath(value).

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

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

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

Returns value if every character is alphabetic, FALSE otherwise.

  • static:
  • access: public
mixed isAlpha (mixed $value)
  • mixed $value
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.

  • static:
  • access: public
mixed isBetween (mixed $value, mixed $min, mixed $max, [mixed $inc = TRUE], mixed $key, boolean $inclusive)
  • mixed $key
  • mixed $min
  • mixed $max
  • boolean $inclusive
isCcnum (line 179)

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

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

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

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

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

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

  • static:
  • access: public
mixed isDigits (mixed $value)
  • mixed $value
isEmail (line 237)

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

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

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

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

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

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

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

  • static:
  • access: public
mixed isHex (mixed $value)
  • mixed $value
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.

  • static:
  • 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
isInt (line 358)

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

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

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

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

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

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

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

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

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

  • static:
  • access: public
mixed isOneOf (mixed $value, [mixed $allowed = NULL])
  • mixed $value
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.

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

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

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

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

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

Returns basename(value).

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

Returns value with all tags removed.

  • static:
  • 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 Tue, 18 Apr 2006 11:55:02 -0700 by phpDocumentor 1.3.0RC3