astina/money-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (0.1.0) of this package.

Maintainers

Package info

github.com/astina/AstinaMoneyBundle

Homepage

Type:symfony-bundle

pkg:composer/astina/money-bundle

Statistics

Installs: 942

Dependents: 0

Suggesters: 0

Stars: 0

0.1.0 2013-04-29 06:55 UTC

This package is not auto-updated.

Last update: 2023-02-13 05:48:55 UTC


README

Symfony bundle for 99designs/money-php.

Adds exchange rate entity and a service for conversion.

Installation

Step 1: Add to composer.json

"require":  {
    "astina/money-bundle":"dev-master",
}

Step 2: Enable the bundle

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Astina\Bundle\MoneyBundle\AstinaMoneyBundle(),
    );
}

##Usage

Note*: CurrencyExchangeRate entities need to be created for the exchanges you need.

$moneyChf = new Money\Money(190, 'CHF');

$moneyConverter = $container->get('astina_money.money_converter');
$moneyEur = $moneyConverter->convert($money, 'EUR');