Cookie.php in Anti Spam by CleanTalk 8.4
File
src/lib/Cleantalk/Common/Variables/Cookie.php
View source
<?php
namespace Cleantalk\Common\Variables;
class Cookie extends SuperGlobalVariables {
static $instance;
protected function get_variable($name, $do_decode = true) {
if (isset(static::$instance->variables[$name])) {
return static::$instance->variables[$name];
}
if (function_exists('filter_input')) {
$value = filter_input(INPUT_COOKIE, $name);
}
if (empty($value)) {
$value = isset($_COOKIE[$name]) ? $_COOKIE[$name] : '';
}
$value = $do_decode ? urldecode($value) : $value;
return $value;
}
}
Classes
Name |
Description |
Cookie |
Class Cookie
Safety handler for $_COOKIE |