public function localizedFormatMoney(Money $money, $locale = null, \NumberFormatter $numberFormatter = null)
    {
        if (!($numberFormatter instanceof \NumberFormatter)) {
            $numberFormatter = $this->getDefaultNumberFormatter($money->getCurrency()->getCode(), $locale);
        }

        return $numberFormatter->formatCurrency($this->asFloat($money), $money->getCurrency()->getCode());
    }
public function localizedFormatMoney(Money $money, $locale = null, \NumberFormatter $numberFormatter = null)
    {
        if (!($numberFormatter instanceof \NumberFormatter)) {
            $numberFormatter = $this->getDefaultNumberFormatter($money->getCurrency()->getCode(), $locale);
        }

        return $numberFormatter->formatCurrency($this->asFloat($money), $money->getCurrency()->getCode());
    }
public function localizedFormatMoney ( Money $ money , $ locale = null , \ NumberFormatter $ numberFormatter = null ) { if ( ! ( $ numberFormatter instanceof \ NumberFormatter ) ) { $ numberFormatter = $ this -> getDefaultNumberFormatter ( $ money -> getCurrency ( ) -> getCode ( ) , $ locale ) ; } return $ numberFormatter -> formatCurrency ( $ this -> asFloat ( $ money ) , $ money -> getCurrency ( ) -> getCode ( ) ) ; }
Format money with the NumberFormatter class

You can force the locale or event use your own $numberFormatter instance to format
the output as you wish.

@see http://www.php.net/manual/en/numberformatter.formatcurrency.php

@param Money                 $money
@param null|string           $locale
@param null|\NumberFormatter $numberFormatter

@return string
Format money with the NumberFormatter class