public function AntiCrawler::__construct in Anti Spam by CleanTalk 9.1.x
Same name and namespace in other branches
- 8.4 src/lib/Cleantalk/Common/Firewall/Modules/AntiCrawler.php \Cleantalk\Common\Firewall\Modules\AntiCrawler::__construct()
* FirewallModule constructor. * Use this method to prepare any data for the module working. * *
Parameters
string $data_table: * @param array $params
Overrides FirewallModule::__construct
File
- src/
lib/ Cleantalk/ Common/ Firewall/ Modules/ AntiCrawler.php, line 51
Class
Namespace
Cleantalk\Common\Firewall\ModulesCode
public function __construct($data_table = 'cleantalk_ac_logs', $params = []) {
$db = DB::getInstance();
$this->ua_bl_table_name = $db->prefix . $data_table;
$this->db__table__ac_logs = $params['db__table__ac_logs'] ? $db->prefix . $params['db__table__ac_logs'] : null;
$this->db__table__sfw_logs = $params['db__table__sfw_logs'] ? $db->prefix . $params['db__table__sfw_logs'] : null;
$this->db__table__sfw = $params['db__table__sfw'] ? $db->prefix . $params['db__table__sfw'] : null;
$this->sign = md5(Server::get('HTTP_USER_AGENT') . Server::get('HTTPS') . Server::get('HTTP_HOST'));
$this->antibot_cookie_value = CleantalkFuncs::create_ac_cookie_value();
}