Class NumberFormat

Summary

Fully Qualified Name: Zend\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
$formatType int
$locale string
$decimals int
$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|null

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: \NumberFormat

setFormatStyle()

Set format style to use instead of the default

Parameter Name Type Description
$formatStyle int

Returns: \NumberFormat

setFormatType()

Set format type to use instead of the default

Parameter Name Type Description
$formatType int

Returns: \NumberFormat

setLocale()

Set locale to use instead of the default.

Parameter Name Type Description
$locale string

Returns: \NumberFormat

setTextAttributes()

Parameter Name Type Description
$textAttributes array

Returns: \NumberFormat

setView()

Set the View object

Parameter Name Type Description
$view \Renderer

Returns: \AbstractHelper

Top