SFW.php in Anti Spam by CleanTalk 8.3
File
src/lib/Cleantalk/ApbctDrupal/SFW.php
View source
<?php
namespace Drupal\cleantalk\lib\Cleantalk\ApbctDrupal;
class SFW extends \Drupal\cleantalk\lib\Cleantalk\Antispam\SFW {
public function __construct($api_key) {
global $DB;
parent::__construct($api_key, \Drupal::service('database'), \Drupal::service('database')
->tablePrefix());
}
protected function universal_query($query) {
$this->db_query = $this->db
->query($query);
}
protected function universal_fetch() {
return $this->db_query
->fetchAssoc();
}
protected function universal_fetch_all() {
$result = array();
while ($row = $this->db_query
->fetchAssoc()) {
$result[] = $row;
}
return $result;
}
}