class Request in Anti Spam by CleanTalk 9.1.x
Same name and namespace in other branches
- 8.4 src/lib/Cleantalk/Common/Variables/Request.php \Cleantalk\Common\Variables\Request
Class Request Safety handler for $_REQUEST
@usage \CleantalkSP\Variables\Request::get( $name );
@package \CleantalkSP\Variables
Hierarchy
- class \Cleantalk\Common\Variables\SuperGlobalVariables uses Singleton
- class \Cleantalk\Common\Variables\Request
Expanded class hierarchy of Request
File
- src/
lib/ Cleantalk/ Common/ Variables/ Request.php, line 13
Namespace
Cleantalk\Common\VariablesView source
class Request extends SuperGlobalVariables {
static $instance;
/**
* Gets given $_REQUEST variable and save it to memory
* @param $name
*
* @return mixed|string
*/
protected function get_variable($name) {
// Return from memory. From $this->variables
if (isset(static::$instance->variables[$name])) {
return static::$instance->variables[$name];
}
$value = isset($_REQUEST[$name]) ? $_REQUEST[$name] : '';
// Remember for thurther calls
static::getInstance()
->remember_variable($name, $value);
return $value;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Request:: |
static | property |
Overrides Singleton:: |
|
Request:: |
protected | function |
* Gets given $_REQUEST variable and save it to memory
* Overrides SuperGlobalVariables:: |
|
Singleton:: |
public static | function | Constructor | |
Singleton:: |
protected | function | Alternative constructor | |
Singleton:: |
public | function | ||
Singleton:: |
public | function | ||
Singleton:: |
public | function | ||
SuperGlobalVariables:: |
public | property | * | |
SuperGlobalVariables:: |
static | function | * Checks if variable equal to $param * * | |
SuperGlobalVariables:: |
public static | function | * Gets variable from ${_SOMETHING} * * | |
SuperGlobalVariables:: |
static | function | * Checks if variable contains given string * * | |
SuperGlobalVariables:: |
protected | function | * Save variable to $this->variables[] * * |