summaryrefslogtreecommitdiff
path: root/ext/intl/formatter/formatter.stub.php
blob: a16ad53518b78d99c06048d3e15f47972cc82949 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php

/** @generate-class-entries */

class NumberFormatter
{
    public function __construct(string $locale, int $style, ?string $pattern = null) {}

    /**
     * @return NumberFormatter|null
     * @alias numfmt_create
     */
    public static function create(string $locale, int $style, ?string $pattern = null) {}

    /**
     * @return string|false
     * @alias numfmt_format
     */
    public function format(int|float $num, int $type = NumberFormatter::TYPE_DEFAULT) {}

    /**
     * @param int $offset
     * @return int|float|false
     * @alias numfmt_parse
     */
    public function parse(string $string, int $type = NumberFormatter::TYPE_DOUBLE, &$offset = null) {}

    /**
     * @return string|false
     * @alias numfmt_format_currency
     */
    public function formatCurrency(float $amount, string $currency) {}

    /**
     * @param string $currency
     * @param int $offset
     * @return float|false
     * @alias numfmt_parse_currency
     */
    public function parseCurrency(string $string, &$currency, &$offset = null) {}

    /**
     * @return bool
     * @alias numfmt_set_attribute
     */
    public function setAttribute(int $attribute, int|float $value) {}

    /**
     * @return int|float|false
     * @alias numfmt_get_attribute
     */
    public function getAttribute(int $attribute) {}

    /**
     * @return bool
     * @alias numfmt_set_text_attribute
     */
    public function setTextAttribute(int $attribute, string $value) {}

    /**
     * @return string|false
     * @alias numfmt_get_text_attribute
     */
    public function getTextAttribute(int $attribute) {}

    /**
     * @return bool
     * @alias numfmt_set_symbol
     */
    public function setSymbol(int $symbol, string $value) {}

    /**
     * @return string|false
     * @alias numfmt_get_symbol
     */
    public function getSymbol(int $symbol) {}

    /**
     * @return bool
     * @alias numfmt_set_pattern
     */
    public function setPattern(string $pattern) {}

    /**
     * @return string|false
     * @alias numfmt_get_pattern
     */
    public function getPattern() {}

    /**
     * @return string|false
     * @alias numfmt_get_locale
     */
    public function getLocale(int $type = ULOC_ACTUAL_LOCALE) {}

    /**
     * @return int
     * @alias numfmt_get_error_code
     */
    public function getErrorCode() {}

    /**
     * @return string
     * @alias numfmt_get_error_message
     */
    public function getErrorMessage() {}
}