## Zend_Filter

Description

Implements interfaces:

- Zend_Filter_Interface

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

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

Class Constant Summary
HOST_ALLOW_ALL = 7
HOST_ALLOW_DNS = 1
HOST_ALLOW_IP = 2
HOST_ALLOW_LOCAL = 4
Variable Summary
array $_filters
Method Summary
static string getAlnum (mixed $value)
static string getAlpha (mixed $value)
static string getDigits (mixed $value)
static string getDir (mixed $value)
static integer getInt (mixed $value)
static string getPath (mixed $value)
static boolean isAlnum (mixed $value)
static boolean isAlpha (mixed $value)
static boolean isBetween ( $value, mixed $min, mixed $max, [boolean $inc = true], mixed $key)
static boolean isCcnum (mixed $value)
static boolean isDate (mixed $value)
static boolean isDigits (mixed $value)
static boolean isEmail (mixed $value)
static boolean isFloat (mixed $value)
static boolean isGreaterThan (mixed $value, mixed $min)
static boolean isHex (mixed $value)
static boolean isHostname (mixed $value, [integer $allow = self::HOST_ALLOW_ALL])
static boolean isInt (mixed $value)
static boolean isIp (mixed $value)
static boolean isLessThan (mixed $value, mixed $max)
static boolean isOneOf (mixed $value, $allowed)
static boolean isRegex (mixed $value, mixed $pattern)
static string noPath (mixed $value)
static string noTags (mixed $value)
Zend_Filter addFilter (Zend_Filter_Interface $filter)
mixed filter (mixed $value)
Variables
array $_filters = array() (line 61)

Filter chain

- access: protected

Methods
static getAlnum (line 113)

Returns only the alphabetic characters and digits in value.

- access: public
- deprecated: since 0.8.0

static string getAlnum (mixed $value)

- mixed $value

static getAlpha (line 99)

Returns only the alphabetic characters in value.

- access: public
- deprecated: since 0.8.0

static string getAlpha (mixed $value)

- mixed $value

static getDigits (line 127)

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

- access: public
- deprecated: since 0.8.0

static string getDigits (mixed $value)

- mixed $value

static getDir (line 141)

Returns dirname(value).

- access: public
- deprecated: since 0.8.0

static string getDir (mixed $value)

- mixed $value

static getInt (line 155)

Returns (int) value.

- access: public
- deprecated: since 0.8.0

static integer getInt (mixed $value)

- mixed $value

static getPath (line 169)

Returns realpath(value).

- access: public
- deprecated: since 0.8.0

static string getPath (mixed $value)

- mixed $value

static isAlnum (line 184)

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

- access: public
- deprecated: since 0.8.0

static boolean isAlnum (mixed $value)

- mixed $value

static isAlpha (line 199)

Returns TRUE if every character is alphabetic, FALSE otherwise.

- access: public
- deprecated: since 0.8.0

static boolean isAlpha (mixed $value)

- mixed $value

static isBetween (line 219)

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

static boolean isBetween ( $value, mixed $min, mixed $max, [boolean $inc = true], mixed $key)

- mixed $key
- mixed $min
- mixed $max
- boolean $inc
- $value

static isCcnum (line 233)

Returns TRUE if it is a valid credit card number format.

- access: public
- deprecated: since 0.8.0

static boolean isCcnum (mixed $value)

- mixed $value

static isDate (line 247)

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

- access: public
- deprecated: since 0.8.0

static boolean isDate (mixed $value)

- mixed $value

static isDigits (line 262)

Returns TRUE 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

static boolean isDigits (mixed $value)

- mixed $value

static isEmail (line 276)

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

- access: public
- deprecated: since 0.8.0

static boolean isEmail (mixed $value)

- mixed $value

static isFloat (line 290)

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

- access: public
- deprecated: since 0.8.0

static boolean isFloat (mixed $value)

- mixed $value

static isGreaterThan (line 305)

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

- access: public
- deprecated: since 0.8.0

static boolean isGreaterThan (mixed $value, mixed $min)

- mixed $value
- mixed $min

static isHex (line 320)

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

- access: public
- deprecated: since 0.8.0

static boolean isHex (mixed $value)

- mixed $value

static isHostname (line 339)

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

static boolean 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 353)

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

- access: public
- deprecated: since 0.8.0

static boolean isInt (mixed $value)

- mixed $value

static isIp (line 367)

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

- access: public
- deprecated: since 0.8.0

static boolean isIp (mixed $value)

- mixed $value

static isLessThan (line 382)

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

- access: public
- deprecated: since 0.8.0

static boolean isLessThan (mixed $value, mixed $max)

- mixed $value
- mixed $max

static isOneOf (line 397)

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

- access: public
- deprecated: since 0.8.0

static boolean isOneOf (mixed $value, $allowed)

- mixed $value
- mixed $allowed

static isRegex (line 413)

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

- access: public
- deprecated: since 0.8.0

static boolean isRegex (mixed $value, mixed $pattern)

- mixed $value
- mixed $pattern

static noPath (line 441)

Returns basename(value).

- access: public
- deprecated: since 0.8.0

static string noPath (mixed $value)

- mixed $value

static noTags (line 427)

Returns value with all tags removed.

- access: public
- deprecated: since 0.8.0

static string noTags (mixed $value)

- mixed $value

addFilter (line 69)

Adds a filter to the end of the chain

- return: Provides a fluent interface
- access: public

Zend_Filter addFilter (Zend_Filter_Interface $filter)

- Zend_Filter_Interface $filter

filter (line 83)

Returns $value filtered through each filter in the chain

Filters are run in the order in which they were added to the chain (FIFO)

- access: public

mixed filter (mixed $value)

- mixed $value

Implementation of:

Zend_Filter_Interface::filter()
  Returns the result of filtering $value

Class Constants
HOST_ALLOW_ALL = 7 (line 54)
HOST_ALLOW_DNS = 1 (line 51)

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.

- deprecated: since 0.8.0

HOST_ALLOW_IP = 2 (line 52)
HOST_ALLOW_LOCAL = 4 (line 53)

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