IpReputation
in package
Table of Contents
- $apiKey : string|null
- $cache : CacheInterface
- $cacheTtl : int
- $http : HttpClient
- __construct() : mixed
- score() : float
- Return a risk score in the range 0 (clean) → 1 (definitely bad).
- setCacheTtl() : self
- setKey() : self
Properties
$apiKey
private
string|null
$apiKey
$cache
private
CacheInterface
$cache
$cacheTtl
private
int
$cacheTtl
$http
private
HttpClient
$http
Methods
__construct()
public
__construct(HttpClient $http, CacheInterface $cache[, string|null $apiKey = null ][, int $cacheTtl = 3600 ]) : mixed
Parameters
- $http : HttpClient
- $cache : CacheInterface
- $apiKey : string|null = null
- $cacheTtl : int = 3600
Return values
mixed —score()
Return a risk score in the range 0 (clean) → 1 (definitely bad).
public
score(string $ip) : float
Parameters
- $ip : string
Return values
float —setCacheTtl()
public
setCacheTtl(int $cacheTtl) : self
Parameters
- $cacheTtl : int
Return values
self —setKey()
public
setKey(string $apiKey) : self
Parameters
- $apiKey : string