The properties and methods of the Visitor Model are identical whether you are accessing them via Twig or PHP.
In both cases,
visitor will be a Visitor Model.
Additional Properties and Methods
The Visitor Model is an extension of the Location Model. It contains all properties and methods of the Location Model, plus the properties and methods shown below.
You can access
lng just as easily as
# Public Properties
string - The name of the service used to perform the geolocation.
string - The IP address of the geolocation lookup.
string - The city determined by the geolocation lookup.
string - The state determined by the geolocation lookup.
string - The country determined by the geolocation lookup.
array - The original data used to create this Visitor Model. Contains the full response from the original geolocation service.
string - If an error occurred during the geolocation process, it will be set here.