SafeMoneyFormat
extends AbstractHelper
in package
Safe money format view helper
Tags
Table of Contents
- $currencyFormatter : CurrencyFormatter
- CurrencyFormatter
- $escapeHtml : EscapeHtml
- Escape helper
- __construct() : mixed
- Constructor
- __invoke() : string
- Convert currency to display format and escape the result
Properties
$currencyFormatter
CurrencyFormatter
protected
CurrencyFormatter
$currencyFormatter
$escapeHtml
Escape helper
protected
EscapeHtml
$escapeHtml
Methods
__construct()
Constructor
public
__construct(CurrencyFormatter $currencyFormatter, EscapeHtml $escapeHtml) : mixed
Parameters
- $currencyFormatter : CurrencyFormatter
-
Currency formatter
- $escapeHtml : EscapeHtml
-
Escaper
Return values
mixed —__invoke()
Convert currency to display format and escape the result
public
__invoke(float $number[, string $currency = null ]) : string
Parameters
- $number : float
-
The number to format
- $currency : string = null
-
Currency format (ISO 4217) to use (null for default)