You are here

AutobanProviderInterface.php in Automatic IP ban (Autoban) 8

Namespace

Drupal\autoban

File

src/AutobanProviderInterface.php
View source
<?php

namespace Drupal\autoban;

use Drupal\Core\Database\Connection;

/**
 * Provides an interface defining a AutobanProvider.
 */
interface AutobanProviderInterface {

  /**
   * Get BanProvider id for store in autoban rule.
   *
   * @return string
   *   Ban provider ID.
   */
  public function getId();

  /**
   * Get BanProvider name for choice list.
   *
   * @return string
   *   Human name for user select.
   */
  public function getName();

  /**
   * Get Ban type: single, range and so on.
   *
   * @return string
   *   Human name for ban type.
   */
  public function getBanType();

  /**
   * Get BanIpManager object.
   *
   * @param \Drupal\Core\Database\Connection $connection
   *   The database connection which will be used get BanIpManager.
   *
   * @return object
   *   BanIpManager object.
   */
  public function getBanIpManager(Connection $connection);

}

Interfaces

Namesort descending Description
AutobanProviderInterface Provides an interface defining a AutobanProvider.