| 1 | <?php namespace Arcanedev\LaravelTracker\Trackers; |
||
| 14 | class GeoIpTracker implements GeoIpTrackerContract |
||
| 15 | { |
||
| 16 | /* ------------------------------------------------------------------------------------------------ |
||
| 17 | | Properties |
||
| 18 | | ------------------------------------------------------------------------------------------------ |
||
| 19 | */ |
||
| 20 | /** @var \Arcanedev\LaravelTracker\Contracts\Detectors\GeoIpDetector */ |
||
| 21 | private $geoIpDetector; |
||
| 22 | |||
| 23 | /* ------------------------------------------------------------------------------------------------ |
||
| 24 | | Constructor |
||
| 25 | | ------------------------------------------------------------------------------------------------ |
||
| 26 | */ |
||
| 27 | /** |
||
| 28 | * GeoIpTracker constructor. |
||
| 29 | * |
||
| 30 | * @param \Arcanedev\LaravelTracker\Contracts\Detectors\GeoIpDetector $geoIpDetector |
||
| 31 | */ |
||
| 32 | 24 | public function __construct(GeoIpDetector $geoIpDetector) |
|
| 36 | |||
| 37 | /* ------------------------------------------------------------------------------------------------ |
||
| 38 | | Main Functions |
||
| 39 | | ------------------------------------------------------------------------------------------------ |
||
| 40 | */ |
||
| 41 | /** |
||
| 42 | * Track the ip address. |
||
| 43 | * |
||
| 44 | * @param string $ipAddress |
||
| 45 | * |
||
| 46 | * @return int|null |
||
| 47 | */ |
||
| 48 | 6 | public function track($ipAddress) |
|
| 58 | } |
||
| 59 |