Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.
 All Data Structures Functions Variables Pages
ZurmoCurrencyCodes.php
1 <?php
2  /*********************************************************************************
3  * Zurmo is a customer relationship management program developed by
4  * Zurmo, Inc. Copyright (C) 2017 Zurmo Inc.
5  *
6  * Zurmo is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Affero General Public License version 3 as published by the
8  * Free Software Foundation with the addition of the following permission added
9  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10  * IN WHICH THE COPYRIGHT IS OWNED BY ZURMO, ZURMO DISCLAIMS THE WARRANTY
11  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
12  *
13  * Zurmo is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Affero General Public License along with
19  * this program; if not, see http://www.gnu.org/licenses or write to the Free
20  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301 USA.
22  *
23  * You can contact Zurmo, Inc. with a mailing address at 27 North Wacker Drive
24  * Suite 370 Chicago, IL 60606. or at email address contact@zurmo.com.
25  *
26  * The interactive user interfaces in original and modified versions
27  * of this program must display Appropriate Legal Notices, as required under
28  * Section 5 of the GNU Affero General Public License version 3.
29  *
30  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31  * these Appropriate Legal Notices must retain the display of the Zurmo
32  * logo and Zurmo copyright notice. If the display of the logo is not reasonably
33  * feasible for technical reasons, the Appropriate Legal Notices must display the words
34  * "Copyright Zurmo Inc. 2017. All rights reserved".
35  ********************************************************************************/
36 
42  {
47  public static function getCodes()
48  {
49  $codes = array(
50  'AED' => 'United Arab Emirates Dirham',
51  'AFN' => 'Afghanistan Afghani',
52  'ALL' => 'Albania Lek',
53  'AMD' => 'Armenia Dram',
54  'ANG' => 'Netherlands Antilles Guilder',
55  'AOA' => 'Angola Kwanza',
56  'ARS' => 'Argentina Peso',
57  'AUD' => 'Australia Dollar',
58  'AWG' => 'Aruba Guilder',
59  'AZN' => 'Azerbaijan New Manat',
60  'BAM' => 'Bosnia and Herzegovina Convertible Marka',
61  'BBD' => 'Barbados Dollar',
62  'BDT' => 'Bangladesh Taka',
63  'BGN' => 'Bulgaria Lev',
64  'BHD' => 'Bahrain Dinar',
65  'BIF' => 'Burundi Franc',
66  'BMD' => 'Bermuda Dollar',
67  'BND' => 'Brunei Darussalam Dollar',
68  'BOB' => 'Bolivia Boliviano',
69  'BRL' => 'Brazil Real',
70  'BSD' => 'Bahamas Dollar',
71  'BTN' => 'Bhutan Ngultrum',
72  'BWP' => 'Botswana Pula',
73  'BYR' => 'Belarus Ruble',
74  'BZD' => 'Belize Dollar',
75  'CAD' => 'Canada Dollar',
76  'CDF' => 'Congo/Kinshasa Franc',
77  'CHF' => 'Switzerland Franc',
78  'CLP' => 'Chile Peso',
79  'CNY' => 'China Yuan Renminbi',
80  'COP' => 'Colombia Peso',
81  'CRC' => 'Costa Rica Colon',
82  'CUC' => 'Cuba Convertible Peso',
83  'CUP' => 'Cuba Peso',
84  'CVE' => 'Cape Verde Escudo',
85  'CZK' => 'Czech Republic Koruna',
86  'DJF' => 'Djibouti Franc',
87  'DKK' => 'Denmark Krone',
88  'DOP' => 'Dominican Republic Peso',
89  'DZD' => 'Algeria Dinar',
90  'EGP' => 'Egypt Pound',
91  'ERN' => 'Eritrea Nakfa',
92  'ETB' => 'Ethiopia Birr',
93  'EUR' => 'Euro Member Countries',
94  'FJD' => 'Fiji Dollar',
95  'FKP' => 'Falkland Islands (Malvinas) Pound',
96  'GBP' => 'United Kingdom Pound',
97  'GEL' => 'Georgia Lari',
98  'GGP' => 'Guernsey Pound',
99  'GHS' => 'Ghana Cedi',
100  'GIP' => 'Gibraltar Pound',
101  'GMD' => 'Gambia Dalasi',
102  'GNF' => 'Guinea Franc',
103  'GTQ' => 'Guatemala Quetzal',
104  'GYD' => 'Guyana Dollar',
105  'HKD' => 'Hong Kong Dollar',
106  'HNL' => 'Honduras Lempira',
107  'HRK' => 'Croatia Kuna',
108  'HTG' => 'Haiti Gourde',
109  'HUF' => 'Hungary Forint',
110  'IDR' => 'Indonesia Rupiah',
111  'ILS' => 'Israel Shekel',
112  'IMP' => 'Isle of Man Pound',
113  'INR' => 'India Rupee',
114  'IQD' => 'Iraq Dinar',
115  'IRR' => 'Iran Rial',
116  'ISK' => 'Iceland Krona',
117  'JEP' => 'Jersey Pound',
118  'JMD' => 'Jamaica Dollar',
119  'JOD' => 'Jordan Dinar',
120  'JPY' => 'Japan Yen',
121  'KES' => 'Kenya Shilling',
122  'KGS' => 'Kyrgyzstan Som',
123  'KHR' => 'Cambodia Riel',
124  'KMF' => 'Comoros Franc',
125  'KPW' => 'Korea (North) Won',
126  'KRW' => 'Korea (South) Won',
127  'KWD' => 'Kuwait Dinar',
128  'KYD' => 'Cayman Islands Dollar',
129  'KZT' => 'Kazakhstan Tenge',
130  'LAK' => 'Laos Kip',
131  'LBP' => 'Lebanon Pound',
132  'LKR' => 'Sri Lanka Rupee',
133  'LRD' => 'Liberia Dollar',
134  'LSL' => 'Lesotho Loti',
135  'LTL' => 'Lithuania Litas',
136  'LVL' => 'Latvia Lat',
137  'LYD' => 'Libya Dinar',
138  'MAD' => 'Morocco Dirham',
139  'MDL' => 'Moldova Leu',
140  'MGA' => 'Madagascar Ariary',
141  'MKD' => 'Macedonia Denar',
142  'MMK' => 'Myanmar (Burma) Kyat',
143  'MNT' => 'Mongolia Tughrik',
144  'MOP' => 'Macau Pataca',
145  'MRO' => 'Mauritania Ouguiya',
146  'MUR' => 'Mauritius Rupee',
147  'MVR' => 'Maldives (Maldive Islands) Rufiyaa',
148  'MWK' => 'Malawi Kwacha',
149  'MXN' => 'Mexico Peso',
150  'MYR' => 'Malaysia Ringgit',
151  'MZN' => 'Mozambique Metical',
152  'NAD' => 'Namibia Dollar',
153  'NGN' => 'Nigeria Naira',
154  'NIO' => 'Nicaragua Cordoba',
155  'NOK' => 'Norway Krone',
156  'NPR' => 'Nepal Rupee',
157  'NZD' => 'New Zealand Dollar',
158  'OMR' => 'Oman Rial',
159  'PAB' => 'Panama Balboa',
160  'PEN' => 'Peru Nuevo Sol',
161  'PGK' => 'Papua New Guinea Kina',
162  'PHP' => 'Philippines Peso',
163  'PKR' => 'Pakistan Rupee',
164  'PLN' => 'Poland Zloty',
165  'PYG' => 'Paraguay Guarani',
166  'QAR' => 'Qatar Riyal',
167  'RON' => 'Romania New Leu',
168  'RSD' => 'Serbia Dinar',
169  'RUB' => 'Russia Ruble',
170  'RWF' => 'Rwanda Franc',
171  'SAR' => 'Saudi Arabia Riyal',
172  'SBD' => 'Solomon Islands Dollar',
173  'SCR' => 'Seychelles Rupee',
174  'SDG' => 'Sudan Pound',
175  'SEK' => 'Sweden Krona',
176  'SGD' => 'Singapore Dollar',
177  'SHP' => 'Saint Helena Pound',
178  'SLL' => 'Sierra Leone Leone',
179  'SOS' => 'Somalia Shilling',
180  'SRD' => 'Suriname Dollar',
181  'STD' => 'S�o Principe and Tome Dobra',
182  'SVC' => 'El Salvador Colon',
183  'SYP' => 'Syria Pound',
184  'SZL' => 'Swaziland Lilangeni',
185  'THB' => 'Thailand Baht',
186  'TJS' => 'Tajikistan Somoni',
187  'TMT' => 'Turkmenistan Manat',
188  'TND' => 'Tunisia Dinar',
189  'TOP' => 'Tonga Pa\'anga',
190  'TRY' => 'Turkey Lira',
191  'TTD' => 'Trinidad and Tobago Dollar',
192  'TVD' => 'Tuvalu Dollar',
193  'TWD' => 'Taiwan New Dollar',
194  'TZS' => 'Tanzania Shilling',
195  'UAH' => 'Ukraine Hryvna',
196  'UGX' => 'Uganda Shilling',
197  'USD' => 'United States Dollar',
198  'UYU' => 'Uruguay Peso',
199  'UZS' => 'Uzbekistan Som',
200  'VEF' => 'Venezuela Bolivar Fuerte',
201  'VND' => 'Viet Nam Dong',
202  'VUV' => 'Vanuatu Vatu',
203  'WST' => 'Samoa Tala',
204  'XCD' => 'East Caribbean Dollar',
205  'YER' => 'Yemen Rial',
206  'ZAR' => 'South Africa Rand',
207  'ZMK' => 'Zambia Kwacha',
208  'ZWD' => 'Zimbabwe Dollar',
209  );
210  return $codes;
211  }
212 
217  public static function getByPartialCodeOrName($partialCodeOrName)
218  {
219  assert('is_string($partialCodeOrName)');
220  $matches = array();
221  $codesAndNames = self::getCodes();
222  foreach ($codesAndNames as $code => $name)
223  {
224  if (stripos($code, $partialCodeOrName) !== false || stripos($name, $partialCodeOrName) !== false)
225  {
226  $matches[$code] = $name;
227  }
228  }
229  return $matches;
230  }
231 
237  public static function isValidCode($code)
238  {
239  return array_key_exists(strtoupper($code), self::getCodes());
240  }
241  }
242 ?>
static getByPartialCodeOrName($partialCodeOrName)
Generated on Sun Jul 12 2020 07:10:28
Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.