2017 © Pedro Peláez
 

library currency-formatter

Currency Formatter

image

indibeast/currency-formatter

Currency Formatter

  • Monday, March 14, 2016
  • by indibeast
  • Repository
  • 4 Watchers
  • 20 Stars
  • 51 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 2 % Grown

The README.md

Currency Formatter

Build Status Coverage Status Code Climate Total Downloads Latest Unstable Version License, (*1)

Minimum Requirements

  • PHP 5.5+

Installation

Install using composer:, (*2)

composer require indibeast/currency-formatter

Example

 $price = new Currency\Price(3000,'LKR');
 $price->pretty();// Rs 3,000.00

You can pass the options as an array to the third parameter. php $price = new Currency\Price(3000,'LKR',['show_decimal' => false,'seperator' => ',']); $price->pretty();// Rs 3,000 Currency conversion php $currency = new Price(1,'USD'); $currency->setConverter(new OpenExchangeConverter('app_id'));// Pass true as second parameter if you are having an enterprise APP_ID. $currency->convert('LKR') // This will convert U.S Dollars to Sri Lankan Rupees If you wish to implement your own currency exchange provider implement \Currency\Converter\ConverterInterface ```php class FixedConverter implements ConverterInterface{, (*3)

 /**
  * @return float
  */
 public function getConversionRate($code,$to)
 {
     return 1;
 }

} ```, (*4)

License

The MIT License (MIT). Please see License File for more information., (*5)

The Versions

14/03 2016

dev-master

9999999-dev

Currency Formatter

  Sources   Download

MIT

The Requires

 

The Development Requires

by Indika Gunasekara

formatter currency

14/03 2016

v1.0

1.0.0.0

Currency Formatter

  Sources   Download

MIT

The Requires

 

The Development Requires

by Indika Gunasekara

formatter currency