Refactor Visitor model and allow a Location object to be passed to it

This commit is contained in:
Alejandro Celaya
2024-11-14 14:48:18 +01:00
parent 1fee745786
commit 4a0b7e3fc9
17 changed files with 131 additions and 87 deletions

View File

@@ -59,4 +59,12 @@ final readonly class TrackingOptions
{
return $this->disableTrackParam !== null && array_key_exists($this->disableTrackParam, $query);
}
/**
* If IP address tracking is disabled, or tracking is disabled all together, then geolocation is not relevant
*/
public function isGeolocationRelevant(): bool
{
return ! $this->disableTracking && ! $this->disableIpTracking;
}
}