protected function getFormatter($culture, $style, $attributes = [], $textAttributes = [], $symbols = [])
    {
        $attributes = $this->parseAttributes(array_merge($this->attributes, $attributes));
        $textAttributes = $this->parseAttributes(array_merge($this->textAttributes, $textAttributes));
        $symbols = $this->parseAttributes(array_merge($this->symbols, $symbols));
        $formatter = new \NumberFormatter($culture, $style);

        self::checkInternalClass($formatter, '\NumberFormatter', [
            'culture' => $culture,
            'style' => $style,
        ]);

        foreach ($attributes as $attribute => $value) {
            $formatter->setAttribute($attribute, $value);
        }

        foreach ($textAttributes as $attribute => $value) {
            $formatter->setTextAttribute($attribute, $value);
        }

        foreach ($symbols as $attribute => $value) {
            $formatter->setSymbol($attribute, $value);
        }

        return $formatter;
    }
protected function getFormatter($culture, $style, $attributes = [], $textAttributes = [], $symbols = [])
    {
        $attributes = $this->parseAttributes(array_merge($this->attributes, $attributes));
        $textAttributes = $this->parseAttributes(array_merge($this->textAttributes, $textAttributes));
        $symbols = $this->parseAttributes(array_merge($this->symbols, $symbols));
        $formatter = new \NumberFormatter($culture, $style);

        self::checkInternalClass($formatter, '\NumberFormatter', [
            'culture' => $culture,
            'style' => $style,
        ]);

        foreach ($attributes as $attribute => $value) {
            $formatter->setAttribute($attribute, $value);
        }

        foreach ($textAttributes as $attribute => $value) {
            $formatter->setTextAttribute($attribute, $value);
        }

        foreach ($symbols as $attribute => $value) {
            $formatter->setSymbol($attribute, $value);
        }

        return $formatter;
    }
protected function getFormatter ( $ culture , $ style , $ attributes = [ ] , $ textAttributes = [ ] , $ symbols = [ ] ) { $ attributes = $ this -> parseAttributes ( array_merge ( $ this -> attributes , $ attributes ) ) ; $ textAttributes = $ this -> parseAttributes ( array_merge ( $ this -> textAttributes , $ textAttributes ) ) ; $ symbols = $ this -> parseAttributes ( array_merge ( $ this -> symbols , $ symbols ) ) ; $ formatter = new \ NumberFormatter ( $ culture , $ style ) ; self :: checkInternalClass ( $ formatter , '\NumberFormatter' , [ 'culture' => $ culture , 'style' => $ style , ] ) ; foreach ( $ attributes as $ attribute => $ value ) { $ formatter -> setAttribute ( $ attribute , $ value ) ; } foreach ( $ textAttributes as $ attribute => $ value ) { $ formatter -> setTextAttribute ( $ attribute , $ value ) ; } foreach ( $ symbols as $ attribute => $ value ) { $ formatter -> setSymbol ( $ attribute , $ value ) ; } return $ formatter ; }
Gets an instance of \NumberFormatter set with the given attributes and
style.

@param string $culture        The culture used by \NumberFormatter
@param string $style          The style used by \NumberFormatter
@param array  $attributes     The attributes used by \NumberFormatter
@param array  $textAttributes The text attributes used by \NumberFormatter
@param array  $symbols        The symbols used by \NumberFormatter

@return \NumberFormatter
Gets an instance of \ NumberFormatter set with the given attributes and style .