View helper for formatting dates.

package Default
inherited_from \Zend\View\Helper\AbstractHelper

 Methods

__construct()

__construct() 

Exceptions

\Zend\I18n\Exception\ExtensionNotLoadedException if ext/intl is not present

Format a number

__invoke(integer|float $number, integer $formatStyle = null, integer $formatType = null, string $locale = null, integer $decimals = null) : string

Parameters

$number

integerfloat

$formatStyle

integer

$formatType

integer

$locale

string

$decimals

integer

Returns

string

Get number of decimals.

getDecimals() : integer

Returns

integer

Get the format style to use

getFormatStyle() : integer

Returns

integer

Get the format type to use

getFormatType() : integer

Returns

integer

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\HelperInterface::getView()

Returns

null\Zend\View\Renderer\RendererInterface

Set number of decimals to use instead of the default.

setDecimals(integer $decimals) : \Zend\I18n\View\Helper\NumberFormat

Parameters

$decimals

integer

Returns

\Zend\I18n\View\Helper\NumberFormat

Set format style to use instead of the default

setFormatStyle(integer $formatStyle) : \Zend\I18n\View\Helper\NumberFormat

Parameters

$formatStyle

integer

Returns

\Zend\I18n\View\Helper\NumberFormat

Set format type to use instead of the default

setFormatType(integer $formatType) : \Zend\I18n\View\Helper\NumberFormat

Parameters

$formatType

integer

Returns

\Zend\I18n\View\Helper\NumberFormat

Set locale to use instead of the default.

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

Parameters

$locale

string

Returns

\Zend\I18n\View\Helper\NumberFormat

Set the View object

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

Parameters

$view

\Zend\View\Renderer\RendererInterface

Returns

\Zend\View\Helper\AbstractHelper

 Properties

 

number of decimals to use.

$decimals : integer

Default

 

NumberFormat style to use

$formatStyle : integer

Default

 

NumberFormat type to use

$formatType : integer

Default

 

Formatter instances

$formatters : array

Default

array()
 

Locale to use instead of the default

$locale : string

Default

 

View object instance

$view : \Zend\View\Renderer\RendererInterface

Default

null