2017 © Pedro Peláez
 

library currency

Currency classes for converting and displaying prices in specific currencies.

image

soneritics/currency

Currency classes for converting and displaying prices in specific currencies.

  • Thursday, February 19, 2015
  • by soneritics
  • Repository
  • 1 Watchers
  • 1 Stars
  • 25 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 4 % Grown

The README.md

Currency

Build Status Coverage Status License, (*1)

by * @Soneritics - Jordi Jolink, (*2)

Introduction

Currency converting and showing a formatted price label., (*3)

Minimum Requirements

  • PHP 5.5+

Features

  • Showing a formatted price; $ 1.99 or € 1,99
  • Converting currencies

Example

$price = (new Price)
    ->addCurrency('euro', new Currency('€', ',', '.'));
    ->addCurrency('usd', new Currency('$', '.', ',', 1.1388));

echo $price->convert(1, 'euro', 'usd'); // 1.1388
echo $price->convert(1, 'usd', 'euro'); // 0.87812

echo $price->show(1); // € 1,00
echo $price->show(1, 'euro'); // € 1.00
echo $price->show(1, 'usd'); // $ 1.39
echo $price->show(1, 'euro', 'usd'); // € 0.88
echo $price->show(1, 'usd', 'euro'); // $ 1.39

The Versions

19/02 2015

dev-master

9999999-dev https://github.com/Soneritics/Currency

Currency classes for converting and displaying prices in specific currencies.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires