6 * Provides an interface defining a BanIp manager.
8 interface BanIpManagerInterface {
11 * Returns if this IP address is banned.
14 * The IP address to check.
17 * TRUE if the IP address is banned, FALSE otherwise.
19 public function isBanned($ip);
22 * Finds all banned IP addresses.
24 * @return \Drupal\Core\Database\StatementInterface
25 * The result of the database query.
27 public function findAll();
33 * The IP address to ban.
35 public function banIp($ip);
38 * Unbans an IP address.
41 * The IP address to unban.
43 public function unbanIp($id);
46 * Finds a banned IP address by its ID.
49 * The ID for a banned IP address.
51 * @return string|false
52 * Either the banned IP address or FALSE if none exist with that ID.
54 public function findById($ban_id);