Files
shlink/module/Core/src/Service/VisitsTrackerInterface.php

27 lines
706 B
PHP
Raw Normal View History

2016-04-17 13:42:52 +02:00
<?php
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
2016-07-19 18:01:39 +02:00
use Shlinkio\Shlink\Core\Entity\Visit;
use Shlinkio\Shlink\Core\Exception\InvalidArgumentException;
use Shlinkio\Shlink\Core\Model\Visitor;
use Shlinkio\Shlink\Core\Model\VisitsParams;
2018-11-28 20:39:08 +01:00
use Zend\Paginator\Paginator;
2016-04-17 13:42:52 +02:00
interface VisitsTrackerInterface
{
/**
* Tracks a new visit to provided short code from provided visitor
2016-04-17 13:42:52 +02:00
*/
public function track(string $shortCode, Visitor $visitor): void;
/**
* Returns the visits on certain short code
*
2018-11-28 20:39:08 +01:00
* @return Visit[]|Paginator
2017-10-22 09:00:32 +02:00
* @throws InvalidArgumentException
*/
2018-11-28 20:39:08 +01:00
public function info(string $shortCode, VisitsParams $params): Paginator;
2016-04-17 13:42:52 +02:00
}