Files
shlink/src/Service/VisitsTrackerInterface.php

25 lines
599 B
PHP
Raw Normal View History

2016-04-17 13:42:52 +02:00
<?php
namespace Acelaya\UrlShortener\Service;
use Acelaya\UrlShortener\Entity\Visit;
use Zend\Paginator\Paginator;
2016-04-17 13:42:52 +02:00
interface VisitsTrackerInterface
{
/**
* Tracks a new visit to provided short code, using an array of data to look up information
*
* @param string $shortCode
* @param array $visitorData Defaults to global $_SERVER
*/
public function track($shortCode, array $visitorData = null);
/**
* Returns the visits on certain shortcode
*
* @param $shortCode
* @return Paginator|Visit[]
*/
public function info($shortCode);
2016-04-17 13:42:52 +02:00
}