merk/Dough — pull request #2 by yethee (2012-05-19 10:33:53+00:00)
Title: Refactoring Twig extension

Use `dough_currency` as twig filter instead of the function.

Now `dough_currency` returns the raw value of the Money object instead of formatted string. This allows use chaining filters.
For example, you can to format the value by using [number_format](http://twig.sensiolabs.org/doc/filters/number_format.html) filter or any filters of SonataIntlBundle:

{{ money|dough_currency|number_format(2) }}
{{ money|dough_currency|number_format_currency('USD') }}

Also you can pass the currency code to `dough_currency` to convert currency, if the Bank is supports multi currency.

{{ money|dough_currency('RUR')|number_format_currency('RUR') }}