Added a getEntry() to BanList (#1830)

This commit is contained in:
Oreo Oreoniv 2017-12-21 13:08:56 +03:00 committed by Dylan K. Taylor
parent 4f8e4f0522
commit 1b4b832c8c

View File

@ -58,6 +58,17 @@ class BanList{
$this->enabled = $flag;
}
/**
* @param string $name
*
* @return BanEntry|null
*/
public function getEntry(string $name) : ?BanEntry{
$this->removeExpired();
return $this->list[strtolower($name)] ?? null;
}
/**
* @return BanEntry[]
*/