You are here

interface BanIpManagerInterface in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/ban/src/BanIpManagerInterface.php \Drupal\ban\BanIpManagerInterface

Provides an interface defining a BanIp manager.

Hierarchy

Expanded class hierarchy of BanIpManagerInterface

All classes that implement BanIpManagerInterface

3 files declare their use of BanIpManagerInterface
BanAdmin.php in core/modules/ban/src/Form/BanAdmin.php
Contains \Drupal\ban\Form\BanAdmin.
BanDelete.php in core/modules/ban/src/Form/BanDelete.php
Contains \Drupal\ban\Form\BanDelete.
BlockedIp.php in core/modules/ban/src/Plugin/migrate/destination/BlockedIp.php
Contains \Drupal\ban\Plugin\migrate\destination\BlockedIP.

File

core/modules/ban/src/BanIpManagerInterface.php, line 13
Contains \Drupal\ban\BanIpManagerInterface.

Namespace

Drupal\ban
View source
interface BanIpManagerInterface {

  /**
   * Returns if this IP address is banned.
   *
   * @param string $ip
   *   The IP address to check.
   *
   * @return bool
   *   TRUE if the IP address is banned, FALSE otherwise.
   */
  public function isBanned($ip);

  /**
   * Finds all banned IP addresses.
   *
   * @return \Drupal\Core\Database\StatementInterface
   *   The result of the database query.
   */
  public function findAll();

  /**
   * Bans an IP address.
   *
   * @param string $ip
   *   The IP address to ban.
   */
  public function banIp($ip);

  /**
   * Unbans an IP address.
   *
   * @param string $id
   *   The IP address to unban.
   */
  public function unbanIp($id);

  /**
   * Finds a banned IP address by its ID.
   *
   * @param int $ban_id
   *   The ID for a banned IP address.
   *
   * @return string|false
   *   Either the banned IP address or FALSE if none exist with that ID.
   */
  public function findById($ban_id);

}

Members

Namesort descending Modifiers Type Description Overrides
BanIpManagerInterface::banIp public function Bans an IP address. 1
BanIpManagerInterface::findAll public function Finds all banned IP addresses. 1
BanIpManagerInterface::findById public function Finds a banned IP address by its ID. 1
BanIpManagerInterface::isBanned public function Returns if this IP address is banned. 1
BanIpManagerInterface::unbanIp public function Unbans an IP address. 1