|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace ByTIC\Money\Traits; |
|
4
|
|
|
|
|
5
|
|
|
use ByTIC\Money\Money; |
|
6
|
|
|
use Money\Currency; |
|
7
|
|
|
|
|
8
|
|
|
/** |
|
9
|
|
|
* Money. |
|
10
|
|
|
* |
|
11
|
|
|
* @method static Money AED(int|string $amount) |
|
12
|
|
|
* @method static Money ALL(int|string $amount) |
|
13
|
|
|
* @method static Money AMD(int|string $amount) |
|
14
|
|
|
* @method static Money ANG(int|string $amount) |
|
15
|
|
|
* @method static Money AOA(int|string $amount) |
|
16
|
|
|
* @method static Money ARS(int|string $amount) |
|
17
|
|
|
* @method static Money AUD(int|string $amount) |
|
18
|
|
|
* @method static Money AWG(int|string $amount) |
|
19
|
|
|
* @method static Money AZN(int|string $amount) |
|
20
|
|
|
* @method static Money BAM(int|string $amount) |
|
21
|
|
|
* @method static Money BBD(int|string $amount) |
|
22
|
|
|
* @method static Money BDT(int|string $amount) |
|
23
|
|
|
* @method static Money BGN(int|string $amount) |
|
24
|
|
|
* @method static Money BHD(int|string $amount) |
|
25
|
|
|
* @method static Money BIF(int|string $amount) |
|
26
|
|
|
* @method static Money BMD(int|string $amount) |
|
27
|
|
|
* @method static Money BND(int|string $amount) |
|
28
|
|
|
* @method static Money BOB(int|string $amount) |
|
29
|
|
|
* @method static Money BOV(int|string $amount) |
|
30
|
|
|
* @method static Money BRL(int|string $amount) |
|
31
|
|
|
* @method static Money BSD(int|string $amount) |
|
32
|
|
|
* @method static Money BTN(int|string $amount) |
|
33
|
|
|
* @method static Money BWP(int|string $amount) |
|
34
|
|
|
* @method static Money BYN(int|string $amount) |
|
35
|
|
|
* @method static Money BZD(int|string $amount) |
|
36
|
|
|
* @method static Money CAD(int|string $amount) |
|
37
|
|
|
* @method static Money CDF(int|string $amount) |
|
38
|
|
|
* @method static Money CHE(int|string $amount) |
|
39
|
|
|
* @method static Money CHF(int|string $amount) |
|
40
|
|
|
* @method static Money CHW(int|string $amount) |
|
41
|
|
|
* @method static Money CLF(int|string $amount) |
|
42
|
|
|
* @method static Money CLP(int|string $amount) |
|
43
|
|
|
* @method static Money CNY(int|string $amount) |
|
44
|
|
|
* @method static Money COP(int|string $amount) |
|
45
|
|
|
* @method static Money COU(int|string $amount) |
|
46
|
|
|
* @method static Money CRC(int|string $amount) |
|
47
|
|
|
* @method static Money CUC(int|string $amount) |
|
48
|
|
|
* @method static Money CUP(int|string $amount) |
|
49
|
|
|
* @method static Money CVE(int|string $amount) |
|
50
|
|
|
* @method static Money CZK(int|string $amount) |
|
51
|
|
|
* @method static Money DJF(int|string $amount) |
|
52
|
|
|
* @method static Money DKK(int|string $amount) |
|
53
|
|
|
* @method static Money DOP(int|string $amount) |
|
54
|
|
|
* @method static Money DZD(int|string $amount) |
|
55
|
|
|
* @method static Money EGP(int|string $amount) |
|
56
|
|
|
* @method static Money ERN(int|string $amount) |
|
57
|
|
|
* @method static Money ETB(int|string $amount) |
|
58
|
|
|
* @method static Money EUR(int|string $amount) |
|
59
|
|
|
* @method static Money FJD(int|string $amount) |
|
60
|
|
|
* @method static Money FKP(int|string $amount) |
|
61
|
|
|
* @method static Money GBP(int|string $amount) |
|
62
|
|
|
* @method static Money GEL(int|string $amount) |
|
63
|
|
|
* @method static Money GHS(int|string $amount) |
|
64
|
|
|
* @method static Money GIP(int|string $amount) |
|
65
|
|
|
* @method static Money GMD(int|string $amount) |
|
66
|
|
|
* @method static Money GNF(int|string $amount) |
|
67
|
|
|
* @method static Money GTQ(int|string $amount) |
|
68
|
|
|
* @method static Money GYD(int|string $amount) |
|
69
|
|
|
* @method static Money HKD(int|string $amount) |
|
70
|
|
|
* @method static Money HNL(int|string $amount) |
|
71
|
|
|
* @method static Money HRK(int|string $amount) |
|
72
|
|
|
* @method static Money HTG(int|string $amount) |
|
73
|
|
|
* @method static Money HUF(int|string $amount) |
|
74
|
|
|
* @method static Money IDR(int|string $amount) |
|
75
|
|
|
* @method static Money ILS(int|string $amount) |
|
76
|
|
|
* @method static Money INR(int|string $amount) |
|
77
|
|
|
* @method static Money IQD(int|string $amount) |
|
78
|
|
|
* @method static Money IRR(int|string $amount) |
|
79
|
|
|
* @method static Money ISK(int|string $amount) |
|
80
|
|
|
* @method static Money JMD(int|string $amount) |
|
81
|
|
|
* @method static Money JOD(int|string $amount) |
|
82
|
|
|
* @method static Money JPY(int|string $amount) |
|
83
|
|
|
* @method static Money KES(int|string $amount) |
|
84
|
|
|
* @method static Money KGS(int|string $amount) |
|
85
|
|
|
* @method static Money KHR(int|string $amount) |
|
86
|
|
|
* @method static Money KMF(int|string $amount) |
|
87
|
|
|
* @method static Money KPW(int|string $amount) |
|
88
|
|
|
* @method static Money KRW(int|string $amount) |
|
89
|
|
|
* @method static Money KWD(int|string $amount) |
|
90
|
|
|
* @method static Money KYD(int|string $amount) |
|
91
|
|
|
* @method static Money KZT(int|string $amount) |
|
92
|
|
|
* @method static Money LAK(int|string $amount) |
|
93
|
|
|
* @method static Money LBP(int|string $amount) |
|
94
|
|
|
* @method static Money LKR(int|string $amount) |
|
95
|
|
|
* @method static Money LRD(int|string $amount) |
|
96
|
|
|
* @method static Money LSL(int|string $amount) |
|
97
|
|
|
* @method static Money LYD(int|string $amount) |
|
98
|
|
|
* @method static Money MAD(int|string $amount) |
|
99
|
|
|
* @method static Money MDL(int|string $amount) |
|
100
|
|
|
* @method static Money MGA(int|string $amount) |
|
101
|
|
|
* @method static Money MKD(int|string $amount) |
|
102
|
|
|
* @method static Money MMK(int|string $amount) |
|
103
|
|
|
* @method static Money MNT(int|string $amount) |
|
104
|
|
|
* @method static Money MOP(int|string $amount) |
|
105
|
|
|
* @method static Money MRU(int|string $amount) |
|
106
|
|
|
* @method static Money MUR(int|string $amount) |
|
107
|
|
|
* @method static Money MVR(int|string $amount) |
|
108
|
|
|
* @method static Money MWK(int|string $amount) |
|
109
|
|
|
* @method static Money MXN(int|string $amount) |
|
110
|
|
|
* @method static Money MXV(int|string $amount) |
|
111
|
|
|
* @method static Money MYR(int|string $amount) |
|
112
|
|
|
* @method static Money MZN(int|string $amount) |
|
113
|
|
|
* @method static Money NAD(int|string $amount) |
|
114
|
|
|
* @method static Money NGN(int|string $amount) |
|
115
|
|
|
* @method static Money NIO(int|string $amount) |
|
116
|
|
|
* @method static Money NOK(int|string $amount) |
|
117
|
|
|
* @method static Money NPR(int|string $amount) |
|
118
|
|
|
* @method static Money NZD(int|string $amount) |
|
119
|
|
|
* @method static Money OMR(int|string $amount) |
|
120
|
|
|
* @method static Money PAB(int|string $amount) |
|
121
|
|
|
* @method static Money PEN(int|string $amount) |
|
122
|
|
|
* @method static Money PGK(int|string $amount) |
|
123
|
|
|
* @method static Money PHP(int|string $amount) |
|
124
|
|
|
* @method static Money PKR(int|string $amount) |
|
125
|
|
|
* @method static Money PLN(int|string $amount) |
|
126
|
|
|
* @method static Money PYG(int|string $amount) |
|
127
|
|
|
* @method static Money QAR(int|string $amount) |
|
128
|
|
|
* @method static Money RON(int|string $amount) |
|
129
|
|
|
* @method static Money RSD(int|string $amount) |
|
130
|
|
|
* @method static Money RUB(int|string $amount) |
|
131
|
|
|
* @method static Money RWF(int|string $amount) |
|
132
|
|
|
* @method static Money SAR(int|string $amount) |
|
133
|
|
|
* @method static Money SBD(int|string $amount) |
|
134
|
|
|
* @method static Money SCR(int|string $amount) |
|
135
|
|
|
* @method static Money SDG(int|string $amount) |
|
136
|
|
|
* @method static Money SEK(int|string $amount) |
|
137
|
|
|
* @method static Money SGD(int|string $amount) |
|
138
|
|
|
* @method static Money SHP(int|string $amount) |
|
139
|
|
|
* @method static Money SLL(int|string $amount) |
|
140
|
|
|
* @method static Money SOS(int|string $amount) |
|
141
|
|
|
* @method static Money SRD(int|string $amount) |
|
142
|
|
|
* @method static Money SSP(int|string $amount) |
|
143
|
|
|
* @method static Money STN(int|string $amount) |
|
144
|
|
|
* @method static Money SVC(int|string $amount) |
|
145
|
|
|
* @method static Money SYP(int|string $amount) |
|
146
|
|
|
* @method static Money SZL(int|string $amount) |
|
147
|
|
|
* @method static Money THB(int|string $amount) |
|
148
|
|
|
* @method static Money TJS(int|string $amount) |
|
149
|
|
|
* @method static Money TMT(int|string $amount) |
|
150
|
|
|
* @method static Money TND(int|string $amount) |
|
151
|
|
|
* @method static Money TOP(int|string $amount) |
|
152
|
|
|
* @method static Money TRY(int|string $amount) |
|
153
|
|
|
* @method static Money TTD(int|string $amount) |
|
154
|
|
|
* @method static Money TWD(int|string $amount) |
|
155
|
|
|
* @method static Money TZS(int|string $amount) |
|
156
|
|
|
* @method static Money UAH(int|string $amount) |
|
157
|
|
|
* @method static Money UGX(int|string $amount) |
|
158
|
|
|
* @method static Money USD(int|string $amount) |
|
159
|
|
|
* @method static Money USN(int|string $amount) |
|
160
|
|
|
* @method static Money UYI(int|string $amount) |
|
161
|
|
|
* @method static Money UYU(int|string $amount) |
|
162
|
|
|
* @method static Money UZS(int|string $amount) |
|
163
|
|
|
* @method static Money VEF(int|string $amount) |
|
164
|
|
|
* @method static Money VND(int|string $amount) |
|
165
|
|
|
* @method static Money VUV(int|string $amount) |
|
166
|
|
|
* @method static Money WST(int|string $amount) |
|
167
|
|
|
* @method static Money XAF(int|string $amount) |
|
168
|
|
|
* @method static Money XAG(int|string $amount) |
|
169
|
|
|
* @method static Money XAU(int|string $amount) |
|
170
|
|
|
* @method static Money XBA(int|string $amount) |
|
171
|
|
|
* @method static Money XBB(int|string $amount) |
|
172
|
|
|
* @method static Money XBC(int|string $amount) |
|
173
|
|
|
* @method static Money XBD(int|string $amount) |
|
174
|
|
|
* @method static Money XBT(int|string $amount) |
|
175
|
|
|
* @method static Money XCD(int|string $amount) |
|
176
|
|
|
* @method static Money XDR(int|string $amount) |
|
177
|
|
|
* @method static Money XOF(int|string $amount) |
|
178
|
|
|
* @method static Money XPD(int|string $amount) |
|
179
|
|
|
* @method static Money XPF(int|string $amount) |
|
180
|
|
|
* @method static Money XPT(int|string $amount) |
|
181
|
|
|
* @method static Money XSU(int|string $amount) |
|
182
|
|
|
* @method static Money XTS(int|string $amount) |
|
183
|
|
|
* @method static Money XUA(int|string $amount) |
|
184
|
|
|
* @method static Money XXX(int|string $amount) |
|
185
|
|
|
* @method static Money YER(int|string $amount) |
|
186
|
|
|
* @method static Money ZAR(int|string $amount) |
|
187
|
|
|
* @method static Money ZMW(int|string $amount) |
|
188
|
|
|
* @method static Money ZWL(int|string $amount) |
|
189
|
|
|
*/ |
|
190
|
|
|
trait MoneyFactory |
|
191
|
|
|
{ |
|
192
|
|
|
/** |
|
193
|
|
|
* __callStatic. |
|
194
|
|
|
* |
|
195
|
|
|
* @param string $method |
|
196
|
|
|
* @param array $arguments |
|
197
|
|
|
* |
|
198
|
|
|
* @return \ByTIC\Money\Money |
|
199
|
|
|
*/ |
|
200
|
|
|
public static function __callStatic($method, array $arguments) |
|
201
|
|
|
{ |
|
202
|
|
|
return new Money($arguments[0], new Currency($method)); |
|
203
|
|
|
} |
|
204
|
|
|
|
|
205
|
|
|
/** |
|
206
|
|
|
* Create a new instance from the base money instance. |
|
207
|
|
|
* |
|
208
|
|
|
* @param \Money\Money $instance |
|
209
|
|
|
* |
|
210
|
|
|
* @return \ByTIC\Money\Money |
|
211
|
|
|
*/ |
|
212
|
|
|
public static function fromMoney(\Money\Money $instance) |
|
213
|
|
|
{ |
|
214
|
|
|
return new Money($instance->getAmount(), $instance->getCurrency()); |
|
215
|
|
|
} |
|
216
|
|
|
} |