leodido / moneylaundry
Collection of utilities to filter and validate money
Fund package maintenance!
leodido
Requires
- php: >=5.4
- zendframework/zend-filter: ~2.2
- zendframework/zend-i18n: ~2.2
- zendframework/zend-validator: ~2.2
Requires (Dev)
- phpunit/phpunit: ~4.3
- ripaclub/zf2-sphinxsearch-tool: dev-develop
- satooshi/php-coveralls: dev-master
This package is not auto-updated.
Last update: 2024-10-26 16:36:21 UTC
README
Collection of utilities to filter and validate money with i18n in mind.
This library includes a series of classes aimed at filtering, validating, formatting, and cleaning up of monetary and currency values.
Components
Filters
Residing in MoneyLaundry\Filter
namespace.
-
Uncurrency
Give him a currency and get the corresponding amount, if the input was correctly formatted according to the chosen locale and filter options
-
Currency
Give him a number, choose a locale and get back a localized currency amount
Validators
Residing in MoneyLaundry\Validator
namespace.
-
Currency
Validate the input as a valid and well-formatted currency amount for the given locale.
Examples
WIP
Installation
Add leodido/moneylaundry
to your composer.json
.
{ "require": { "leodido/moneylaundry": "v0.2.0" } }
Development
First of all give it a composer install
.
Then you can run tests:
-
Unit tests suite
vendor/bin/phpunit -c $PWD/unit.xml
- Almost completely covered.
-
Integration tests suite [WIP]
vendor/bin/phpunit -c $PWD/integration.xml
-
More than 45K tests will be executed
-
Results available in
data
directory
-
Authors
Main contributors (i.e., authors) are: