Server IP : 172.67.157.199 / Your IP : 18.118.26.112 [ 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/chroot/var/www/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; } } }