Download the PHP package slick/filter without Composer
On this page you can find all versions of the php package slick/filter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package filter
Short Description Filter utilities for Slick Framework
License MIT
Homepage https://github.com/slickframework/filter
Informations about the package filter
Slick Filter package
Slick Filter is a set of filter utilities tah can be used to filter input values, sanitize data and create filter chains to apply on a certain value.
This package is compliant with PSR-2 code standards and PSR-4 autoload standards. It also applies the semantic version 2.0.0 specification.
Install
Via Composer
Usage
The best way to filter your data is to use the StaticFilter
utility class. It can create any
FilterInterface
filter and it has alias for the known filters that are bundled with the
Slick\Filter
package.
Known filters
Alias | Class | Description |
---|---|---|
text | Slick\Filter\Text |
Converts input to a string |
number | Slick\Filter\Number |
Converts the input to an integer number |
url | Slick\Filter\Url |
Converts/Fixes the input to a valid URL |
htmlEntities | Slick\Filter\HtmlEntities |
Converts special characters to its html entity representation |
Filter chains
It is also possible to combine multiple filters to a single input value by using the
FilterChainInterface
.
The above code will output:
You can create you own filters by implementing the FilterInterface
.
Testing
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.