Server IP : 172.24.0.40 / Your IP : 216.73.216.10 Web Server : Apache System : Linux dbweb26.ust.edu.ph 4.18.0-513.5.1.el8_9.x86_64 #1 SMP Fri Sep 29 05:21:10 EDT 2023 x86_64 User : apache ( 48) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/tomas/public_html/wp-content/plugins/ninja-forms/includes/Factories/ |
Upload File : |
<?php namespace NinjaForms\Includes\Factories; use NinjaForms\Includes\Entities\NfSite; class ConstructNfSiteEntity { /** * Return constructed site entity * * @return NfSite */ public function handle(): NfSite { $array = $this->constructSiteVariableArray(); $return = NfSite::fromArray($array); return $return; } /** * Construct site variable array * * @return array */ protected function constructSiteVariableArray(): array { $ip_address = ''; if ( array_key_exists( 'SERVER_ADDR', $_SERVER ) ) { $ip_address = $_SERVER[ 'SERVER_ADDR' ]; } else if ( array_key_exists( 'LOCAL_ADDR', $_SERVER ) ) { $ip_address = $_SERVER[ 'LOCAL_ADDR' ]; } $return = array( 'url' => site_url(), 'ip_address' => $ip_address ); return $return; } }