Gumbo_Filter_Preg
PREG Filter Class
Author(s): |
Michael Luster <mluster79@yahoo.com> |
License: | New BSD License |
Copyright: | Copyright (c) 2007, iBayou, Michael Luster |
Link: | http://sourceforge.net/projects/phpgumbo |
Version: | 0.0.1 |
Implements interfaces:
Child classes:
- Gumbo_Filter_Alpha
- Gumbo_Filter_AlphaNum
- Gumbo_Filter_Digit
- Gumbo_Filter_Language
- Gumbo_Filter_Printable
Class Variables
string $_char [line 40]
int $_count = 0 [line 44]
int $_limit = -1 [line 42]
string $_pattern [line 38]
Class Methods
public Gumbo_Filter_Preg __construct ( [string $pattern], [string $char], [int $limit] )
[line 54]
Constructor
Parameter(s):
- (string) $pattern :: regular expression pattern
- (string) $char :: replacement character
- (int) $limit
Overridden in child classes as:
- Gumbo_Filter_Alpha::__construct()
- Constructor
- Gumbo_Filter_AlphaNum::__construct()
- Constructor
- Gumbo_Filter_Digit::__construct()
- Constructor
- Gumbo_Filter_Language::__construct()
- Constructor
[ Top ]
public string|array run ( string|array $data )
[line 68]
Runs the Filter process, returning the results
Parameter(s):
- (string|array) $data :: data to filter
Overridden in child classes as:
- Gumbo_Filter_Language::run()
- Runs the Filter process, returning the results
Implementation of:
[ Top ]
public void setChar ( [string $char] )
[line 116]
Sets the replacement character
Parameter(s):
- (string) $char
- throws:
Gumbo_Exception
[ Top ]protected void setCount ( int $count ) [line 159]Sets the count
Parameter(s):
- (int) $count
- precondition:
$count >= 0 - throws:
Gumbo_Exception
[ Top ]public void setLimit ( int $limit ) [line 136]Sets the Limit
Parameter(s):
- (int) $limit
- precondition:
$limit >= -1 (no limit) - throws:
Gumbo_Exception
[ Top ]public void setPattern ( string $pattern ) [line 97]Sets the Regular Expression Pattern
Parameter(s):
- (string) $pattern
- throws:
Gumbo_Exception
[ Top ]