src/MvcCore/Ext/Views/Helpers/FormatNumberHelper.php
protected function & getIntlNumberFormatter (
		$langAndLocale = NULL,
		$style = NULL,
		$pattern = NULL,
		$attributes = [],
		$textAttributes = []
	) {
		$key = implode('_', [
			'number',
			serialize(func_get_args())
		]);
		if (!isset($this->intlFormatters[$key])) {
			$formatter = \numfmt_create(
				$this->langAndLocale, $style, $pattern
			);
			foreach ($attributes as $key => $value)
				\numfmt_set_attribute($formatter, $key, $value);
			foreach ($textAttributes as $key => $value)
				\numfmt_set_text_attribute($formatter, $key, $value);
			$this->intlFormatters[$key] = & $formatter;
		}
		return $this->intlFormatters[$key];
	}
protected function & getIntlNumberFormatter (
		$langAndLocale = NULL,
		$style = NULL,
		$pattern = NULL,
		$attributes = [],
		$textAttributes = []
	) {
		$key = implode('_', [
			'number',
			serialize(func_get_args())
		]);
		if (!isset($this->intlFormatters[$key])) {
			$formatter = \numfmt_create(
				$this->langAndLocale, $style, $pattern
			);
			foreach ($attributes as $key => $value)
				\numfmt_set_attribute($formatter, $key, $value);
			foreach ($textAttributes as $key => $value)
				\numfmt_set_text_attribute($formatter, $key, $value);
			$this->intlFormatters[$key] = & $formatter;
		}
		return $this->intlFormatters[$key];
	}
protected function & getIntlNumberFormatter ( $ langAndLocale = NULL , $ style = NULL , $ pattern = NULL , $ attributes = [ ] , $ textAttributes = [ ] ) { $ key = implode ( '_' , [ 'number' , serialize ( func_get_args ( ) ) ] ) ; if ( ! isset ( $ this -> intlFormatters [ $ key ] ) ) { $ formatter = \ numfmt_create ( $ this -> langAndLocale , $ style , $ pattern ) ; foreach ( $ attributes as $ key => $ value ) \ numfmt_set_attribute ( $ formatter , $ key , $ value ) ; foreach ( $ textAttributes as $ key => $ value ) \ numfmt_set_text_attribute ( $ formatter , $ key , $ value ) ; $ this -> intlFormatters [ $ key ] = & $ formatter ; } return $ this -> intlFormatters [ $ key ] ; }
Get stored `\NumberFormatter` instance or create new one.
@param string|NULL	$langAndLocale
@param int|NULL		$style
@param int|NULL		$pattern
@param array			$attributes
@param array			$textAttributes
@return \NumberFormatter
Get stored \ NumberFormatter instance or create new one .