906. Class

906.1. Zend\I18n\View\Helper\CurrencyFormat

View helper for formatting currency.

906.1.1. Methods

906.1.1.1. setCurrencyCode

setCurrencyCode()

The 3-letter ISO 4217 currency code indicating the currency to use.

Parameters:string
Return type:CurrencyFormat

906.1.1.2. getCurrencyCode

getCurrencyCode()

Get the 3-letter ISO 4217 currency code indicating the currency to use.

Return type:string

906.1.1.3. setShouldShowDecimals

setShouldShowDecimals()

Set if the view helper should show two decimals

Parameters:bool
Return type:CurrencyFormat

906.1.1.4. shouldShowDecimals

shouldShowDecimals()

Get if the view helper should show two decimals

Return type:bool

906.1.1.5. setLocale

setLocale()

Set locale to use instead of the default.

Parameters:string
Return type:CurrencyFormat

906.1.1.6. getLocale

getLocale()

Get the locale to use.

Return type:string|null

906.1.1.7. __invoke

__invoke()

Format a number.

Parameters:
  • float
  • string
  • bool
  • string
Return type:

string