Fully Qualified Name: | Laminas\I18n\View\Helper\NumberFormat |
Extends: | AbstractHelper |
View helper for formatting dates.
Name | Description | Defined By |
---|---|---|
__construct() | NumberFormat | |
__invoke() | Format a number | NumberFormat |
getDecimals() | Get number of decimals. | NumberFormat |
getFormatStyle() | Get the format style to use | NumberFormat |
getFormatType() | Get the format type to use | NumberFormat |
getLocale() | Get the locale to use | NumberFormat |
getTextAttributes() | NumberFormat | |
getView() | Get the view object | AbstractHelper |
setDecimals() | Set number of decimals to use instead of the default. | NumberFormat |
setFormatStyle() | Set format style to use instead of the default | NumberFormat |
setFormatType() | Set format type to use instead of the default | NumberFormat |
setLocale() | Set locale to use instead of the default. | NumberFormat |
setTextAttributes() | NumberFormat | |
setView() | Set the View object | AbstractHelper |
Returns:
Format a number
Parameter Name | Type | Description |
---|---|---|
$number | int|float | |
$formatStyle | int|null | |
$formatType | int|null | |
$locale | string|null | |
$decimals | int|null | |
$textAttributes | array|null |
Returns: string
Get number of decimals.
Returns: int
Get the format style to use
Returns: int
Get the format type to use
Returns: int
Get the locale to use
Returns: string
Returns: array
Get the view object
Returns: null|\Renderer
Set number of decimals to use instead of the default.
Parameter Name | Type | Description |
---|---|---|
$decimals | int |
Returns: $this
Set format style to use instead of the default
Parameter Name | Type | Description |
---|---|---|
$formatStyle | int |
Returns: $this
Set format type to use instead of the default
Parameter Name | Type | Description |
---|---|---|
$formatType | int |
Returns: $this
Set locale to use instead of the default.
Parameter Name | Type | Description |
---|---|---|
$locale | string |
Returns: $this
Parameter Name | Type | Description |
---|---|---|
$textAttributes | array |
Returns: $this
Set the View object
Parameter Name | Type | Description |
---|---|---|
$view | \Renderer |
Returns: \AbstractHelper