public function createMoney($amount, $currency = null)
    {
        if (null === $currency) {
            $currency = $this->getBaseCurrency();
        }

        $this->checkCurrencies($currency);

        $class = $this->moneyClass;
        return new $class($amount, $currency);
    }
public function createMoney($amount, $currency = null)
    {
        if (null === $currency) {
            $currency = $this->getBaseCurrency();
        }

        $this->checkCurrencies($currency);

        $class = $this->moneyClass;
        return new $class($amount, $currency);
    }
public function createMoney ( $ amount , $ currency = null ) { if ( null === $ currency ) { $ currency = $ this -> getBaseCurrency ( ) ; } $ this -> checkCurrencies ( $ currency ) ; $ class = $ this -> moneyClass ; return new $ class ( $ amount , $ currency ) ; }
Creates a new money instance. If currency is not supplied
the base currency for this bank is used.

@param float|int $amount
@param string|null $currency

@return \Dough\Money\MultiCurrencyMoney

@throws \Dough\Exception\InvalidCurrencyException when a supplied currency is
unknown.
Creates a new money instance . If currency is not supplied the base currency for this bank is used .