You are here

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;


/*
 * CleanTalk SpamFireWall Bitrix class
 * author Cleantalk team (welcome@cleantalk.org)
 * copyright (C) 2014 CleanTalk team (http://cleantalk.org)
 * license GNU/GPL: http://www.gnu.org/copyleft/gpl.html
 * see https://github.com/CleanTalk/php-antispam
*/
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;
  }

}

Classes

Namesort descending Description
SFW