| Server IP : 13.126.101.145 / Your IP : 216.73.217.50 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ip-11-115-0-196 6.8.0-1039-aws #41~22.04.1-Ubuntu SMP Thu Sep 11 10:54:48 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.3.17 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/rentals_updated/wp-content/plugins/ultimate-dashboard/ |
Upload File : |
<?php
/**
* Setter & getter utility
*
* @package Ultimate_Dashboard
*/
namespace Udb;
defined( 'ABSPATH' ) || die( "Can't access directly" );
/**
* Global setter & getter utility
*
* Vars::set($key, $value);
*
* @param string/array $key
* @param mix $value
*
* Vars::get($key);
* @param string $key
* @return mix $value
*/
class Vars {
/**
* Item's container
*
* @var array
*/
private static $vars = [];
/**
* Get value from a given key
*
* @param string $name The key name.
* @return mixed
*/
public static function get( $name ) {
$value = isset( self::$vars[ $name ] ) ? self::$vars[ $name ] : '';
return $value;
}
/**
* Set key-value pair
* - single mode: set the $key as key name, $value as the data
* - multiple mode: set the $key as array of key-value pairs, and leave the $value empty
*
* @param string $name Can be either key name or array of key-value pairs.
* @param string $value The data.
* @return void
*/
public static function set( $name, $value = '' ) {
if ( is_array( $name ) ) {
foreach ( $name as $key => $value ) {
self::$vars[ $key ] = $value;
}
} else {
self::$vars[ $name ] = $value;
}
}
}