protected function Request::get_variable in Anti Spam by CleanTalk 8.4
Same name and namespace in other branches
- 9.1.x src/lib/Cleantalk/Common/Variables/Request.php \Cleantalk\Common\Variables\Request::get_variable()
* Gets given $_REQUEST variable and save it to memory *
Parameters
$name: * * @return mixed|string
Overrides SuperGlobalVariables::get_variable
File
- src/
lib/ Cleantalk/ Common/ Variables/ Request.php, line 23
Class
- Request
- Class Request Safety handler for $_REQUEST
Namespace
Cleantalk\Common\VariablesCode
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;
}