Class NumberFormat

Summary

Fully Qualified Name: Laminas\I18n\View\Helper\NumberFormat
Extends: AbstractHelper

Description

View helper for formatting dates.

Methods

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

Method Details

__construct()

Returns:

__invoke()

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

getDecimals()

Get number of decimals.

Returns: int

getFormatStyle()

Get the format style to use

Returns: int

getFormatType()

Get the format type to use

Returns: int

getLocale()

Get the locale to use

Returns: string

getTextAttributes()

Returns: array

getView()

Get the view object

Returns: null|\Renderer

setDecimals()

Set number of decimals to use instead of the default.

Parameter Name Type Description
$decimals int

Returns: $this

setFormatStyle()

Set format style to use instead of the default

Parameter Name Type Description
$formatStyle int

Returns: $this

setFormatType()

Set format type to use instead of the default

Parameter Name Type Description
$formatType int

Returns: $this

setLocale()

Set locale to use instead of the default.

Parameter Name Type Description
$locale string

Returns: $this

setTextAttributes()

Parameter Name Type Description
$textAttributes array

Returns: $this

setView()

Set the View object

Parameter Name Type Description
$view \Renderer

Returns: \AbstractHelper

Top