HEX
Server: LiteSpeed
System: Linux s383.bitcommand.com 5.14.0-687.24.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul 9 18:14:06 EDT 2026 x86_64
User: pclast (1605)
PHP: 8.1.34
Disabled: exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/pclast/www/wp-content/plugins/seo-by-rank-math/includes/helpers/class-param.php
<?php
/**
 * The Helper class that provides easy access to accessing params from $_GET, $_POST and $_REQUEST.
 *
 * @since      1.0.0
 * @package    RankMath
 * @subpackage RankMath\Helpers
 * @author     RankMath <support@rankmath.com>
 */

namespace RankMath\Helpers;

/**
 * Param class.
 */
class Param {

	/**
	 * Get field from query string.
	 *
	 * @param string $id            Field id to get.
	 * @param mixed  $default_value Default value to return if field is not found.
	 * @param int    $filter        The ID of the filter to apply.
	 * @param int    $flag          The ID of the flag to apply.
	 *
	 * @return mixed
	 */
	public static function get( $id, $default_value = false, $filter = FILTER_DEFAULT, $flag = [] ) {
		return filter_has_var( INPUT_GET, $id ) ? filter_input( INPUT_GET, $id, $filter, $flag ) : $default_value;
	}

	/**
	 * Get field from FORM post.
	 *
	 * @param string $id            Field id to get.
	 * @param mixed  $default_value Default value to return if field is not found.
	 * @param int    $filter        The ID of the filter to apply.
	 * @param int    $flag          The ID of the flag to apply.
	 *
	 * @return mixed
	 */
	public static function post( $id, $default_value = false, $filter = FILTER_DEFAULT, $flag = [] ) {
		return filter_has_var( INPUT_POST, $id ) ? filter_input( INPUT_POST, $id, $filter, $flag ) : $default_value;
	}

	/**
	 * Get field from request.
	 *
	 * @param string $id            Field id to get.
	 * @param mixed  $default_value Default value to return if field is not found.
	 * @param int    $filter        The ID of the filter to apply.
	 * @param int    $flag          The ID of the flag to apply.
	 *
	 * @return mixed
	 */
	public static function request( $id, $default_value = false, $filter = FILTER_DEFAULT, $flag = [] ) {
		return isset( $_REQUEST[ $id ] ) ? filter_var( $_REQUEST[ $id ], $filter, $flag ) : $default_value;
	}

	/**
	 * Get field from FORM server.
	 *
	 * @param string $id            Field id to get.
	 * @param mixed  $default_value Default value to return if field is not found.
	 * @param int    $filter        The ID of the filter to apply.
	 * @param int    $flag          The ID of the flag to apply.
	 *
	 * @return mixed
	 */
	public static function server( $id, $default_value = false, $filter = FILTER_DEFAULT, $flag = [] ) {
		return isset( $_SERVER[ $id ] ) ? filter_var( $_SERVER[ $id ], $filter, $flag ) : $default_value;
	}
}