14.2. Standard Filter Classes

The Zend Framework comes with a standard set of filters, which are ready for you to use.

14.2.1. Alnum

Returns the string $value, removing all but alphabetic and digit characters. This filter includes an option to also allow white space characters.

14.2.2. Alpha

Returns the string $value, removing all but alphabetic characters. This filter includes an option to also allow white space characters.

14.2.3. BaseName

Given a string containing a path to a file, this filter will return the base name of the file

14.2.4. Digits

Returns the string $value, removing all but digit characters.

14.2.5. Dir

Returns directory name component of path.

14.2.6. HtmlEntities

Returns the string $value, converting characters to their corresponding HTML entity equivalents where they exist.

14.2.7. Int

Returns (int) $value

14.2.8. RealPath

Expands all symbolic links and resolves references to '/./', '/../' and extra '/' characters in the input path and return the canonicalized absolute pathname. The resulting path will have no symbolic link, '/./' or '/../' components.

Zend_Filter_RealPath will return FALSE on failure, e.g. if the file does not exist. On BSD systems Zend_Filter_RealPath doesn't fail if only the last path component doesn't exist, while other systems will return FALSE.

14.2.9. StringToLower

Returns the string $value, converting alphabetic characters to lowercase as necessary.

14.2.10. StringToUpper

Returns the string $value, converting alphabetic characters to uppercase as necessary.

14.2.11. StringTrim

Returns the string $value with characters stripped from the beginning and end.

14.2.12. StripTags

This filter returns the input string, with all HTML and PHP tags stripped from it, except those that have been explicitly allowed. In addition to the ability to specify which tags are allowed, developers can specify which attributes are allowed across all allowed tags and for specific tags only. Finally, this filter offers control over whether comments (e.g., <!-- ... -->) are removed or allowed.

    Поддержать сайт на родительском проекте КГБ