leodido / moneylaundry
货币过滤和验证工具集合
v0.2.0
2015-04-17 10:09 UTC
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-09-14 15:47:41 UTC
README
考虑到国际化(i18n),货币过滤和验证工具集合。
这个库包含一系列旨在进行货币和货币值过滤、验证、格式化和清理的类。
组件
过滤器
位于 MoneyLaundry\Filter
命名空间。
-
Uncurrency
给他一个货币,如果输入根据所选区域设置和过滤器选项正确格式化,则获取相应的金额
-
Currency
给他一个数字,选择一个区域设置,然后返回本地化的货币金额
验证器
位于 MoneyLaundry\Validator
命名空间。
-
Currency
验证输入作为给定区域设置的合法且格式良好的货币金额。
示例
进行中
安装
将 leodido/moneylaundry
添加到您的 composer.json
文件中。
{ "require": { "leodido/moneylaundry": "v0.2.0" } }
开发
首先执行 composer install
。
然后您可以运行测试
-
单元测试套件
vendor/bin/phpunit -c $PWD/unit.xml
- 几乎全部覆盖。
-
集成测试套件 [进行中]
vendor/bin/phpunit -c $PWD/integration.xml
-
将执行超过 45K 个测试
-
结果在
data
目录中可用
-
作者
主要贡献者(即作者)是