Heystack\Ecommerce\Currency\Interfaces\CurrencyServiceInterface
Defines what a Currency Service needs to implement
- Author: Glenn Bautista <glenn@heyday.co.nz>
- Copyright: Heyday
Synopsis
interface CurrencyServiceInterface
extends StateableInterface
{
- // methods
- public bool setActiveCurrency()
- public CurrencyInterface getActiveCurrency()
- public array getCurrencies()
- public Money convert()
- public CurrencyInterface getCurrency()
- public void getDefaultCurrency()
- public void setDefaultCurrency()
- public string getActiveCurrencyCode()
- public Money getZeroMoney()
Hierarchy
Extends
- Heystack\Core\State\StateableInterface
Methods
public
- convert() — Converts amount from one currency to another using the currency's identifier
- getActiveCurrency() — Retrieves the currently active currency
- getActiveCurrencyCode() — Retrieves the currently active currency code
- getCurrencies() — Retrieves all the currencies
- getCurrency() — Retrieves a currency object based on the identifier
- getDefaultCurrency() — Retrieves the default currency object
- getZeroMoney()
- setActiveCurrency() — Sets the currently active currency
- setDefaultCurrency() — Sets the default currency