Location
in package
WhatsApp PHP Location entity.
Tags
Table of Contents
Properties
- $address : string|null
- Location address, if any.
- $latitude : int
- Latitude coordinates.
- $longitude : int
- Longitude coordinates.
- $name : string|null
- Location name, if any.
- $url : string|null
- Location URL, if any.
Methods
- __construct() : mixed
- Create Location entity.
- toAppleMaps() : string
- Converts the location to an Apple Maps link.
- toGoogleMaps() : string
- Converts the location to a Google Maps link.
- toWaze() : string
- Converts the location to a Waze link.
Properties
$address
Location address, if any.
public
string|null
$address
$latitude
Latitude coordinates.
public
int
$latitude
$longitude
Longitude coordinates.
public
int
$longitude
$name
Location name, if any.
public
string|null
$name
$url
Location URL, if any.
public
string|null
$url
Methods
__construct()
Create Location entity.
public
__construct([array<string|int, mixed> $data = [] ]) : mixed
Parameters
- $data : array<string|int, mixed> = []
-
(Optional) Associative array of data to populate.
toAppleMaps()
Converts the location to an Apple Maps link.
public
toAppleMaps() : string
Return values
string —Returns the URL.
toGoogleMaps()
Converts the location to a Google Maps link.
public
toGoogleMaps() : string
Return values
string —Returns the URL.
toWaze()
Converts the location to a Waze link.
public
toWaze() : string
Return values
string —Returns the URL.