View helper for formatting currency.

category Zend
package Zend_I18n
subpackage View

 Methods

Format a number.

__invoke(float $number, string $currencyCode, bool $showDecimals, string $locale) : string

Parameters

$number

float

$currencyCode

string

$showDecimals

bool

$locale

string

Returns

string

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

getCurrencyCode() : string

Returns

string

Get the locale to use.

getLocale() : string | null

Returns

stringnull

Get the view object

getView() : null | \Zend\View\Renderer\RendererInterface
Inherited

inherited_from \Zend\View\Helper\AbstractHelper::getView()

Returns

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

setCurrencyCode(string $currencyCode) : \Zend\I18n\View\Helper\CurrencyFormat

Parameters

$currencyCode

string

Returns

Set locale to use instead of the default.

setLocale(string $locale) : \Zend\I18n\View\Helper\CurrencyFormat

Parameters

$locale

string

Returns

Set if the view helper should show two decimals

setShouldShowDecimals(bool $showDecimals) : \Zend\I18n\View\Helper\CurrencyFormat

Parameters

$showDecimals

bool

Returns

Set the View object

setView(\Zend\View\Renderer\RendererInterface $view) : \Zend\View\Helper\AbstractHelper
Inherited

inherited_from \Zend\View\Helper\AbstractHelper::setView()

Parameters

Returns

Get if the view helper should show two decimals

shouldShowDecimals() : bool

Returns

bool

 Properties

 

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

$currencyCode : string

 

Formatter instances.

$formatters : array

 

Locale to use instead of the default.

$locale : string

 

If set to true, the currency will be returned with two decimals

$showDecimals : bool

 

View object

$view : \Zend\View\Renderer\RendererInterface
Inherited

inherited_from \Zend\View\Helper\AbstractHelper::$$view