mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 01:03:13 +08:00
Added event dispatcher to track when a short URL is visited
This commit is contained in:
@@ -65,6 +65,11 @@ class Visit extends AbstractEntity implements JsonSerializable
|
||||
return $this->visitLocation ?? new UnknownVisitLocation();
|
||||
}
|
||||
|
||||
public function isLocatable(): bool
|
||||
{
|
||||
return $this->hasRemoteAddr() && $this->remoteAddr !== IpAddress::LOCALHOST;
|
||||
}
|
||||
|
||||
public function locate(VisitLocation $visitLocation): self
|
||||
{
|
||||
$this->visitLocation = $visitLocation;
|
||||
|
||||
Reference in New Issue
Block a user