Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Filterus - A flexible PHP 5.3 filter package
============================================

## Filter Methods:
## Filter Methods

Each filter class has two primary methods:

* `$filter->filter($var)` - returns a modified version of `$var` filtered to the options. If it cannot be safely modified, a default value will be returned.
* `$filter->filter($var)` - returns a modified version of the value filtered to the options. If it cannot be safely modified, a default value will be returned.
* `$filter->validate($var)` - Returns a boolean identifying if the value is valid.

## Simple Filters (with options):
## Simple Filters (with options)

* `alnum` - Alpha numeric
* `min` - 0 - Minimum length
Expand Down Expand Up @@ -60,7 +60,7 @@ Each filter class has two primary methods:
* `Filter::chain($filter1, $filter2...)` - Chains multiple filters together to run on the same value (similar to `AND` joining filters).
* `Filter::pool($filter1, $filter2...)` - Runs the same value through multiple filters using the first valid return (similar to `OR` joining filters)

## Usage:
## Usage

Simple filters can be specified using a comma-separated-value list. So a filter specifying a string with minimum length of 5 could be represented as:

Expand Down