2016-04-17 13:42:52 +02:00
|
|
|
<?php
|
2019-10-05 17:26:10 +02:00
|
|
|
|
2017-10-12 10:13:20 +02:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2016-07-19 18:01:39 +02:00
|
|
|
namespace Shlinkio\Shlink\Core\Service;
|
2016-04-17 13:42:52 +02:00
|
|
|
|
2020-01-01 21:11:53 +01:00
|
|
|
use Laminas\Paginator\Paginator;
|
2020-02-01 13:03:48 +01:00
|
|
|
use Shlinkio\Shlink\Core\Entity\ShortUrl;
|
2016-07-19 18:01:39 +02:00
|
|
|
use Shlinkio\Shlink\Core\Entity\Visit;
|
2019-11-24 23:11:25 +01:00
|
|
|
use Shlinkio\Shlink\Core\Exception\ShortUrlNotFoundException;
|
2020-05-09 09:53:45 +02:00
|
|
|
use Shlinkio\Shlink\Core\Exception\TagNotFoundException;
|
2020-02-01 17:34:16 +01:00
|
|
|
use Shlinkio\Shlink\Core\Model\ShortUrlIdentifier;
|
2018-10-18 20:19:22 +02:00
|
|
|
use Shlinkio\Shlink\Core\Model\Visitor;
|
2018-11-27 21:09:27 +01:00
|
|
|
use Shlinkio\Shlink\Core\Model\VisitsParams;
|
2021-01-03 17:48:32 +01:00
|
|
|
use Shlinkio\Shlink\Rest\Entity\ApiKey;
|
2016-06-12 21:51:06 +02:00
|
|
|
|
2016-04-17 13:42:52 +02:00
|
|
|
interface VisitsTrackerInterface
|
|
|
|
|
{
|
2020-02-02 09:51:17 +01:00
|
|
|
public function track(ShortUrl $shortUrl, Visitor $visitor): void;
|
2016-06-12 21:51:06 +02:00
|
|
|
|
|
|
|
|
/**
|
2018-11-28 20:39:08 +01:00
|
|
|
* @return Visit[]|Paginator
|
2019-11-24 23:11:25 +01:00
|
|
|
* @throws ShortUrlNotFoundException
|
2016-06-12 21:51:06 +02:00
|
|
|
*/
|
2021-01-03 17:48:32 +01:00
|
|
|
public function info(ShortUrlIdentifier $identifier, VisitsParams $params, ?ApiKey $apiKey = null): Paginator;
|
2020-05-09 09:53:45 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Visit[]|Paginator
|
|
|
|
|
* @throws TagNotFoundException
|
|
|
|
|
*/
|
|
|
|
|
public function visitsForTag(string $tag, VisitsParams $params): Paginator;
|
2016-04-17 13:42:52 +02:00
|
|
|
}
|