BanIpManagerInterface::findAll

public BanIpManagerInterface::findAll() Finds all banned IP addresses. Return value \Drupal\Core\Database\StatementInterface The result of the database query. File core/modules/ban/src/BanIpManagerInterface.php, line 27 Class BanIpManagerInterface Provides an interface defining a BanIp manager. Namespace Drupal\ban Code public function findAll();

BanIpManagerInterface::banIp

public BanIpManagerInterface::banIp($ip) Bans an IP address. Parameters string $ip: The IP address to ban. File core/modules/ban/src/BanIpManagerInterface.php, line 35 Class BanIpManagerInterface Provides an interface defining a BanIp manager. Namespace Drupal\ban Code public function banIp($ip);

BanIpManagerInterface

Provides an interface defining a BanIp manager. Hierarchy interface \Drupal\ban\BanIpManagerInterface File core/modules/ban/src/BanIpManagerInterface.php, line 8 Namespace Drupal\ban Members Name Modifiers Type Description BanIpManagerInterface::banIp public function Bans an IP address. BanIpManagerInterface::findAll public function Finds all banned IP addresses. BanIpManagerInterface::findById public function Finds a banned IP address by its ID. BanIpM

BanIpManager::__construct

public BanIpManager::__construct(Connection $connection) Construct the BanSubscriber. Parameters \Drupal\Core\Database\Connection $connection: The database connection which will be used to check the IP against. File core/modules/ban/src/BanIpManager.php, line 25 Class BanIpManager Ban IP manager. Namespace Drupal\ban Code public function __construct(Connection $connection) { $this->connection = $connection; }

BanIpManager::unbanIp

public BanIpManager::unbanIp($id) Unbans an IP address. Parameters string $id: The IP address to unban. Overrides BanIpManagerInterface::unbanIp File core/modules/ban/src/BanIpManager.php, line 56 Class BanIpManager Ban IP manager. Namespace Drupal\ban Code public function unbanIp($id) { $this->connection->delete('ban_ip') ->condition('ip', $id) ->execute(); }

BanIpManager::isBanned

public BanIpManager::isBanned($ip) Returns if this IP address is banned. Parameters string $ip: The IP address to check. Return value bool TRUE if the IP address is banned, FALSE otherwise. Overrides BanIpManagerInterface::isBanned File core/modules/ban/src/BanIpManager.php, line 32 Class BanIpManager Ban IP manager. Namespace Drupal\ban Code public function isBanned($ip) { return (bool) $this->connection->query("SELECT * FROM {ban_ip} WHERE ip = :ip", array(':ip' => $ip))

BanIpManager::findById

public BanIpManager::findById($ban_id) Finds a banned IP address by its ID. Parameters int $ban_id: The ID for a banned IP address. Return value string|false Either the banned IP address or FALSE if none exist with that ID. Overrides BanIpManagerInterface::findById File core/modules/ban/src/BanIpManager.php, line 65 Class BanIpManager Ban IP manager. Namespace Drupal\ban Code public function findById($ban_id) { return $this->connection->query("SELECT ip FROM {ban_ip} WHERE ii

BanIpManager::findAll

public BanIpManager::findAll() Finds all banned IP addresses. Return value \Drupal\Core\Database\StatementInterface The result of the database query. Overrides BanIpManagerInterface::findAll File core/modules/ban/src/BanIpManager.php, line 39 Class BanIpManager Ban IP manager. Namespace Drupal\ban Code public function findAll() { return $this->connection->query('SELECT * FROM {ban_ip}'); }

BanIpManager::banIp

public BanIpManager::banIp($ip) Bans an IP address. Parameters string $ip: The IP address to ban. Overrides BanIpManagerInterface::banIp File core/modules/ban/src/BanIpManager.php, line 46 Class BanIpManager Ban IP manager. Namespace Drupal\ban Code public function banIp($ip) { $this->connection->merge('ban_ip') ->key(array('ip' => $ip)) ->fields(array('ip' => $ip)) ->execute(); }

BanIpManager::$connection

The database connection used to check the IP against. Type: \Drupal\Core\Database\Connection File core/modules/ban/src/BanIpManager.php, line 17 Class BanIpManager Ban IP manager. Namespace Drupal\ban Code protected $connection;