You are here

class SFW in Anti Spam by CleanTalk 8.3

Same name in this branch
  1. 8.3 src/lib/Cleantalk/ApbctDrupal/SFW.php \Drupal\cleantalk\lib\Cleantalk\ApbctDrupal\SFW
  2. 8.3 src/lib/Cleantalk/Antispam/SFW.php \Drupal\cleantalk\lib\Cleantalk\Antispam\SFW

Hierarchy

  • class \Drupal\cleantalk\lib\Cleantalk\Antispam\SFW
    • class \Drupal\cleantalk\lib\Cleantalk\ApbctDrupal\SFW

Expanded class hierarchy of SFW

3 files declare their use of SFW
BootSubscriber.php in src/EventSubscriber/BootSubscriber.php
CleantalkFuncs.php in src/CleantalkFuncs.php
CleantalkSettingsForm.php in src/Form/CleantalkSettingsForm.php

File

src/lib/Cleantalk/ApbctDrupal/SFW.php, line 13

Namespace

Drupal\cleantalk\lib\Cleantalk\ApbctDrupal
View source
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;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SFW::$api_key private property
SFW::$db protected property
SFW::$db_query protected property
SFW::$ips_array private property
SFW::$table_prefix private property
SFW::check_ip public function
SFW::ip_get private function
SFW::send_logs public function
SFW::sfw_die private function
SFW::sfw_update public function
SFW::sfw_update_logs protected function
SFW::universal_fetch protected function Overrides SFW::universal_fetch
SFW::universal_fetch_all protected function Overrides SFW::universal_fetch_all
SFW::universal_query protected function Overrides SFW::universal_query
SFW::__construct public function Overrides SFW::__construct