Download the PHP package rodrigojavornik/php-cleanup without Composer
On this page you can find all versions of the php package rodrigojavornik/php-cleanup. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rodrigojavornik/php-cleanup
More information about rodrigojavornik/php-cleanup
Files in rodrigojavornik/php-cleanup
Package php-cleanup
Short Description A PHP Sanitation Library
License MIT
Homepage https://github.com/rodrigojavornik/PHPCleanup
Informations about the package php-cleanup
PHP Cleanup
A powerful sanitization library for PHP and Laravel. No dependencies
Installation
Usage
Available filters
- captalize: Capitalize a string;
- captalizeAll: Capitalize all string;
- dateTime: Transform a string in DateTime object;
- email: Removes all characters not allowed in an email address;
- escape: Applies htmlspecialchars to value;
- formatNumber: Format a number with grouped thousands;
- input: Strip one whitespace from the beginning and end of a string and remove any HTML and PHP tags;
- keys: applies sanitaze to elements of an array;
- lowercase: Make a string lowercase;
- money: Formats a number as a monetary value;
- onlyAlpha: Removes any non-alphabetic characters;
- onlyLatinAlpha: Removes all non-Latin characters;
- onlyNumbers: Removes all non-numeric characters;
- removeAccentedCharacters: Replaces accented characters with non-accented ones;
- stripTags: Applies strip_tags to value;
- trim: Strip whitespace from the beginning and end of a string;
- upperCase: Make a string uppercase;
captalize
Capitalize a string Return: Sanitize object
captalizeAll
Capitalize all string Return: Sanitaze object
dateTime
Transform a string in DateTime object Params: $dateFormat = 'Y-m-d H:i:s' Return: DateTime object or false
Removes all characters not allowed in an email address Return: Sanitize object
escape
Applies htmlspecialchars to value Return: Sanitize object
formatNumber
Formats a number with thousands grouped Params: $decimalPlace = 2 , $decimalSeparator = '.' , $thousandsSeparator = '' Return: Sanitize object
Note: The onlyNumber filter is applied.
input
Strip one whitespace from the beginning and end of a string and remove any HTML and PHP tags Return: Sanitize object
keys
Apply sanitaze to elements of an array Params: array Return: Sanitize object
lowercase
Strip one whitespace from the beginning and end of a string and remove any HTML and PHP tags Return: Sanitize object
Money
Formats a number as a monetary value Params: $locale = 'en-US' Return: Sanitize object
Note: The onlyNumber filter is applied. You can check a complete list of currenty locale here.
onlyAlpha
Removes any non-alphabetic characters; Params: $additionalChars Return: Sanitize object
onlyLatinAlpha
Removes any non-alphabetic characters; Params: $additionalChars Return: Sanitize object
onlyNumbers
Removes all non-numeric characters Return: Sanitize object
removeAccentedCharacters
Replaces accented characters with non-accented ones Return: Sanitize object
stripTags
Applies strip_tags to value Params: $allowableTags Return: Sanitize object
trim
Strip whitespace from the beginning and end of a string Return: Sanitize object
trim
Make a string uppercase Return: Sanitize object