Used middleware from library to actually find visitor IP addresses

This commit is contained in:
Alejandro Celaya
2018-10-18 20:19:22 +02:00
parent 99f45d8853
commit 545094cddf
9 changed files with 90 additions and 45 deletions

View File

@@ -3,20 +3,17 @@ declare(strict_types=1);
namespace Shlinkio\Shlink\Core\Service;
use Psr\Http\Message\ServerRequestInterface;
use Shlinkio\Shlink\Common\Util\DateRange;
use Shlinkio\Shlink\Core\Entity\Visit;
use Shlinkio\Shlink\Core\Exception\InvalidArgumentException;
use Shlinkio\Shlink\Core\Model\Visitor;
interface VisitsTrackerInterface
{
/**
* Tracks a new visit to provided short code, using an array of data to look up information
*
* @param string $shortCode
* @param ServerRequestInterface $request
* Tracks a new visit to provided short code from provided visitor
*/
public function track($shortCode, ServerRequestInterface $request): void;
public function track(string $shortCode, Visitor $visitor): void;
/**
* Returns the visits on certain short code