/** * Checks the type of visitor for the given IP address if it's part of a types' group. * * @param string $client Optional. IP address to check. Defaults to client's IP. * @param array $types Optional. List of valid type identifiers. * @return mixed The type identifier if no `$types` are passed. Otherwise result of the check. */ public function isOfType($client = null, $types = null) { extract($this->HttpBL->query($client)); if (!is_null($types)) { return in_array($type, (array) $types); } return $type; }
/** * @return bool */ protected function httpbl() { if ($this->request->getIp()->isV6()) { return false; } $httpbl = new HttpBL($this->settings['httpbl_key']); $result = $httpbl->query($this->request->getIp()); }