Created new namespace for IP geolocation elements

This commit is contained in:
Alejandro Celaya
2018-11-11 12:44:57 +01:00
parent bbe85cde31
commit b530cf4461
8 changed files with 13 additions and 13 deletions

View File

@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Common\IpGeolocation;
use Shlinkio\Shlink\Common\Exception\WrongIpException;
interface IpLocationResolverInterface
{
/**
* @param string $ipAddress
* @return array
* @throws WrongIpException
*/
public function resolveIpLocation(string $ipAddress): array;
/**
* Returns the interval in seconds that needs to be waited when the API limit is reached
*
* @return int
*/
public function getApiInterval(): int;
/**
* Returns the limit of requests that can be performed to the API in a specific interval, or null if no limit exists
*
* @return int|null
*/
public function getApiLimit(): ?int;
}