Updated VisitsTracker so that the track method expects a Request object to be provided

This commit is contained in:
Alejandro Celaya
2016-08-09 08:52:06 +02:00
parent 34753ca7d3
commit 73a236b3d0
4 changed files with 11 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
<?php
namespace Shlinkio\Shlink\Core\Service;
use Psr\Http\Message\ServerRequestInterface;
use Shlinkio\Shlink\Common\Util\DateRange;
use Shlinkio\Shlink\Core\Entity\Visit;
@@ -10,9 +11,10 @@ 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
* @param ServerRequestInterface $request
* @return
*/
public function track($shortCode, array $visitorData = null);
public function track($shortCode, ServerRequestInterface $request);
/**
* Returns the visits on certain short code