setkyar/moneyformat
Composer 安装命令:
composer require setkyar/moneyformat
包简介
Format your money
关键字:
README 文档
README
You want to format your money? Let's format with simply way :)
Installation
Create composer.json and add the following
{
"require" : {
"setkyar/moneyformat" : "dev-master"
}
}
And run $ composer install via your terminal
Usage
Create new php file and add the following
<?php
// Display Errors On
ini_set('display_errors', 'On');
$autoload = __DIR__.'/vendor/autoload.php';
if ( ! file_exists($autoload))
{
exit("Need to run \"composer install\"!");
}
require $autoload;
use SetKyar\MoneyFormat\MoneyFormat;
$currency = new MoneyFormat;
var_dump($currency->Format(2000, 'Kyats')); //string(11) "Kyats 2,000"
var_dump($currency->Format(2000, 'USD')); //string(11) "USD 2,000"
Todo
- Write Test
Contributing
- Fork it ( https://github.com/setkyar/phpmoneyformat )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Stars to both Packagist and Here are welcome 😄
License
WTFPL
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: wtfpl
- 更新时间: 2015-03-02