Skip to content

classes_essentials_localization_currencyformat.class

Daniel Spors edited this page Feb 14, 2023 · 3 revisions

Classes in file essentials/localization/currencyformat.class.php

class CurrencyFormat

Helper class for currency formatting.

Namespace: ScavixWDF\Localization

Format

Formats a currency value to string.

Definition: public function Format($amount, $use_plain=false, $only_value=false)

Returns: string Formatted currency string

Parameters:

  • float $amount Value to format

  • bool $use_plain If true will use curreny code instead of symbol

  • bool $only_value If true totally skips currency code or symbol

StrToCurrencyValue

Converts a string formatted as supposed in this currency back to float.

Definition: public function StrToCurrencyValue($str)

Returns: float|false The value or false on error

Parameters:

  • string $str String containing currency
Clone this wiki locally