GRAYBYTE WORDPRESS FILE MANAGER2940

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/trustyourlawyer.com/wp-content/plugins/ninja-forms/includes/Entities/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/trustyourlawyer.com/wp-content/plugins/ninja-forms/includes/Entities//NfSite.php
<?php

namespace NinjaForms\Includes\Entities;
use JsonSerializable;

class NfSite implements JsonSerializable
{
    const STRUCTURE = [
        'url' => 'string',
        'ip_address' => 'string'
    ];

    public string $url='';
    public string $ip_address='';
    
    /**
     * Construct entity from array
     *
     * @param array $array
     * @return NfSite
     */
    public static function fromArray(array $array): NfSite
    {
        $obj = new static();

        foreach (self::STRUCTURE as $property => $propertyType) {

            $addThis = false;

            if (isset($array[$property])) {

                switch ($propertyType) {
                    case 'string':
                        if (is_string($array[$property])) {
                            $addThis = true;
                        }
                        break;
                    case 'array':
                        if (\is_array($array[$property])) {
                            $addThis = true;
                        }
                        break;
                    case 'bool':
                        if (\is_bool($array[$property])) {
                            $addThis = true;
                        }
                        break;
                    default:
                        // do not add if property type is not specified    
                }
            }

            if ($addThis) {
                $obj->$property = $array[$property];
            }
        }

        return  $obj;
    }

    /** @inheritDoc */
    public function toArray()
    {
        $return = [];

        foreach (array_keys(self::STRUCTURE) as $property) {

            $return[$property] = $this->$property;
        }

        return $return;
    }

    /** @inheritDoc */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        return $this->toArray();
    }
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:23
giriqfky / giriqfky
0755
.htaccess
0.41 KB
July 10 2025 04:32:23
giriqfky / giriqfky
0644
MetaboxOutputEntity.php
3.641 KB
October 11 2021 19:04:16
giriqfky / giriqfky
0644
NfSite.php
1.845 KB
September 02 2024 17:15:32
giriqfky / giriqfky
0644
NfSiteEnvironment.php
3.497 KB
February 10 2025 15:18:06
giriqfky / giriqfky
0644
SimpleEntity.php
2.184 KB
February 09 2023 21:52:18
giriqfky / giriqfky
0644
SingleSubmission.php
7.989 KB
February 12 2024 22:23:38
giriqfky / giriqfky
0644
SubmissionExtraHandlerResponse.php
3.588 KB
November 15 2021 22:31:24
giriqfky / giriqfky
0644
SubmissionField.php
6.335 KB
March 14 2023 21:17:06
giriqfky / giriqfky
0644
SubmissionFilter.php
4.782 KB
August 30 2022 18:49:42
giriqfky / giriqfky
0644
TelemetryLegacyRequest.php
2.196 KB
September 02 2024 17:15:32
giriqfky / giriqfky
0644
Usage.php
2.918 KB
February 10 2025 15:18:06
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF