added invoice model to invoice created event (#3079)
* added model to InvoiceCreatedEvent * allow to switch formatter locale
This commit is contained in:
@@ -16,49 +16,21 @@ use DateTime;
|
||||
*/
|
||||
interface InvoiceFormatter
|
||||
{
|
||||
/**
|
||||
* @param DateTime $date
|
||||
* @return mixed
|
||||
*/
|
||||
public function getFormattedDateTime(DateTime $date);
|
||||
public function getLocale(): string;
|
||||
|
||||
/**
|
||||
* @param DateTime $date
|
||||
* @return mixed
|
||||
*/
|
||||
public function getFormattedTime(DateTime $date);
|
||||
public function setLocale(string $locale): void;
|
||||
|
||||
/**
|
||||
* @param int|float $amount
|
||||
* @param string|null $currency
|
||||
* @param bool $withCurrency
|
||||
* @return string
|
||||
*/
|
||||
public function getFormattedMoney($amount, ?string $currency, bool $withCurrency = true);
|
||||
public function getFormattedDateTime(DateTime $date): string;
|
||||
|
||||
/**
|
||||
* @param DateTime $date
|
||||
* @return mixed
|
||||
*/
|
||||
public function getFormattedMonthName(DateTime $date);
|
||||
public function getFormattedTime(DateTime $date): string;
|
||||
|
||||
/**
|
||||
* @param int $seconds
|
||||
* @return mixed
|
||||
*/
|
||||
public function getFormattedDuration($seconds);
|
||||
public function getFormattedMoney(float $amount, ?string $currency, bool $withCurrency = true): string;
|
||||
|
||||
/**
|
||||
* @param int $seconds
|
||||
* @return mixed
|
||||
*/
|
||||
public function getFormattedDecimalDuration($seconds);
|
||||
public function getFormattedMonthName(DateTime $date): string;
|
||||
|
||||
public function getFormattedDuration(int $seconds): string;
|
||||
|
||||
public function getFormattedDecimalDuration(int $seconds): string;
|
||||
|
||||
/**
|
||||
* Returns the currency symbol for the given currency by name.
|
||||
*
|
||||
* @param string $currency
|
||||
* @return string
|
||||
*/
|
||||
public function getCurrencySymbol(string $currency): string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user