ClassesBigCommerceCurrencyWith Currency

With_Currency

Provides currency formatting functionality for classes.

  • Full name: \BigCommerce\Currency\With_Currency

Methods

format_currency

Formats a numeric value as a currency string.

protected format_currency(float $value, string $empty_value = ''): string

Parameters:

ParameterTypeDescription
$valuefloatThe currency value to format.
$empty_valuestringThe value to return if $value is empty. Pass null to format anyway.

Return Value:

The formatted currency string or the empty value.



Automatically generated on 2025-01-21