| Server IP : 38.190.208.107 / Your IP : 216.73.217.46 Web Server : nginx/1.28.1 System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64 User : root ( 0) PHP Version : 8.2.28 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv,eval,assert,passthru,system,exec,shell_exec,popen,proc_open MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/wp.3/wp-content/plugins/woocommerce/lib/packages/League/ISO3166/ |
Upload File : |
<?php
declare(strict_types=1);
/*
* (c) Rob Bast <rob.bast@gmail.com>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Automattic\WooCommerce\Vendor\League\ISO3166;
class ISO3166WithAliases implements ISO3166DataProvider
{
private ISO3166DataProvider $source;
/** @type array<string, string> */
public const aliases = [
'Bolivia' => 'Bolivia (Plurinational State of)',
'Bolivia, Plurinational State of' => 'Bolivia (Plurinational State of)',
'Congo-Kinshasa' => 'Congo (Democratic Republic of the)',
'Congo, Democratic Republic of the' => 'Congo (Democratic Republic of the)',
'Czech Republic' => 'Czechia',
'Iran' => 'Iran (Islamic Republic of)',
'North Korea' => 'Korea (Democratic People\'s Republic of)',
'South Korea' => 'Korea (Republic of)',
'Laos' => 'Lao People\'s Democratic Republic',
'Micronesia' => 'Micronesia (Federated States of)',
'Moldova' => 'Moldova (Republic of)',
'Palestine' => 'Palestine, State of',
'Russia' => 'Russian Federation',
'Saint Martin' => 'Saint Martin (French part)',
'Sint Maarten' => 'Sint Maarten (Dutch part)',
'Taiwan' => 'Taiwan (Province of China)',
'Tanzania' => 'Tanzania, United Republic of',
'United Kingdom' => 'United Kingdom of Great Britain and Northern Ireland',
'United States' => 'United States of America',
'USA' => 'United States of America',
'Venezuela' => 'Venezuela (Bolivarian Republic of)',
'Vietnam' => 'Viet Nam',
];
public function __construct(ISO3166DataProvider $iso3166)
{
$this->source = $iso3166;
}
public function name(string $name): array
{
foreach (self::aliases as $alias => $original) {
if (0 === strcasecmp($alias, $name)) {
$name = $original;
break;
}
}
return $this->source->name($name);
}
public function alpha2(string $alpha2): array
{
return $this->source->alpha2($alpha2);
}
public function alpha3(string $alpha3): array
{
return $this->source->alpha3($alpha3);
}
public function numeric(string $numeric): array
{
return $this->source->numeric($numeric);
}
}