Programmer's Reference Guide
| Введение |
Standard Filter Classes
The Zend Framework comes with a standard set of filters, which are ready for you to use.
Alnum
Returns the string $value, removing all but alphabetic and digit characters. This filter
includes an option to also allow white space characters.
Alpha
Returns the string $value, removing all but alphabetic characters. This filter includes an
option to also allow white space characters.
BaseName
Given a string containing a path to a file, this filter will return the base name of the file
Digits
Returns the string $value, removing all but digit characters.
Dir
Returns directory name component of path.
HtmlEntities
Returns the string $value, converting characters to their corresponding
HTML entity equivalents where they exist.
Int
Returns (int) $value
StripNewlines
Returns the string $value without any newline control characters.
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.
StringToLower
Returns the string $value, converting alphabetic characters to lowercase as necessary.
StringToUpper
Returns the string $value, converting alphabetic characters to uppercase as necessary.
StringTrim
Returns the string $value with characters stripped from the beginning and end.
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.
| Введение |
